Skip to content

Commit

Permalink
Merge pull request #438 from uploadcare/fix/add-react-native-export-f…
Browse files Browse the repository at this point in the history
…ield

Add react-native export field
  • Loading branch information
nd0ut authored Oct 28, 2022
2 parents a521ff8 + 4bbf19f commit 7f10ea6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions packages/api-client-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/index.browser.js",
"module": "dist/index.browser.js",
"browser": "dist/index.browser.js",
"types": "dist/types.d.ts",
"types": "dist/index.d.ts",
"sideEffects": false,
"files": [
"dist/*"
Expand All @@ -15,7 +15,7 @@
"test": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
"prebuild": "npm run clean",
"build": "npm run build:types && npm run build:compile",
"build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts",
"build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/index.d.ts src/index.ts",
"build:compile": "rollup -c"
},
"repository": {
Expand Down
10 changes: 5 additions & 5 deletions packages/rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
"type": "module",
"module": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"node": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"default": "./dist/index.browser.js"
},
"./browser": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.browser.js"
},
"./node": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.node.js"
}
},
Expand All @@ -30,7 +30,7 @@
"test:production": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
"prebuild": "npm run clean",
"build": "npm run build:types && npm run build:compile",
"build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts",
"build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/index.d.ts src/index.ts",
"build:compile": "rollup -c"
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ import { AddonName } from '../../types/AddonName'
import { executeAddon } from './executeAddon'
import { ADDONS_UUID } from '../../../test/fixtures'
import { copyFileToLocalStorage } from '../file/copyFileToLocalStorage'
import { delay } from '@uploadcare/api-client-utils'

describe('addonExecutionStatus', () => {
it('should work', async () => {
const copy = await copyFileToLocalStorage(
{ source: ADDONS_UUID, store: false },
testSettings
)

await delay(1000)
const { requestId } = await executeAddon(
{
addonName: AddonName.AWS_REKOGNITION_DETECT_LABELS,
target: copy.result.uuid
},
testSettings
)

await delay(1000)
const response = await addonExecutionStatus(
{
addonName: AddonName.AWS_REKOGNITION_DETECT_LABELS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ describe('documentConversionJobStatus', () => {
},
testSettings
)
expect(
[
ConversionStatus.PENDING,
ConversionStatus.PROCESSING,
ConversionStatus.FINISHED
].includes(response.status)
).toBeTruthy()
expect([
ConversionStatus.PENDING,
ConversionStatus.PROCESSING,
ConversionStatus.FINISHED
]).toContain(response.status)
})

it('should throw error if non-200 status received', async () => {
Expand Down
13 changes: 7 additions & 6 deletions packages/upload-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
"type": "module",
"module": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"types": "./dist/types.d.ts",
"react-native": "./dist/index.react-native.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"node": "./dist/index.node.js",
"browser": "./dist/index.browser.js",
"default": "./dist/index.browser.js"
},
"./browser": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.browser.js"
},
"./node": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.node.js"
},
"./react-native": {
"types": "./dist/types.d.ts",
"types": "./dist/index.d.ts",
"default": "./dist/index.react-native.js"
}
},
Expand All @@ -40,7 +41,7 @@
"test:jest": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
"prebuild": "npm run clean",
"build": "npm run build:types && npm run build:compile",
"build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts",
"build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/index.d.ts src/index.ts",
"build:compile": "rollup -c"
},
"repository": {
Expand Down

0 comments on commit 7f10ea6

Please sign in to comment.