From 641a0c4dad3d6900aec45f4a62fc8bfbbb8889cc Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Thu, 5 Sep 2019 16:07:51 -0400 Subject: [PATCH 01/11] Migrate codebase to use Typescript project references & incremental builds --- .gitignore | 2 + package.json | 9 ++- packages/address-consts/package.json | 4 -- .../{tsconfig.build.json => tsconfig.json} | 2 +- packages/address-mocks/package.json | 4 -- packages/address-mocks/tsconfig.json | 16 +++++ packages/address/package.json | 4 -- packages/address/tsconfig.json | 16 +++++ .../admin-graphql-api-utilities/package.json | 4 -- .../tsconfig.json} | 2 +- packages/ast-utilities/package.json | 4 -- packages/ast-utilities/tsconfig.build.json | 15 ---- .../tsconfig.json} | 2 +- packages/async/package.json | 4 -- packages/async/tsconfig.build.json | 15 ---- .../tsconfig.json} | 2 +- packages/csrf-token-fetcher/package.json | 4 -- .../csrf-token-fetcher/tsconfig.build.json | 15 ---- packages/csrf-token-fetcher/tsconfig.json | 15 ++++ packages/css-utilities/package.json | 4 -- packages/css-utilities/tsconfig.build.json | 15 ---- packages/css-utilities/tsconfig.json | 15 ++++ packages/dates/package.json | 4 -- packages/dates/tsconfig.build.json | 15 ---- packages/dates/tsconfig.json | 16 +++++ packages/decorators/package.json | 4 -- packages/decorators/tsconfig.build.json | 15 ---- packages/decorators/tsconfig.json | 16 +++++ packages/enzyme-utilities/package.json | 4 -- packages/enzyme-utilities/tsconfig.build.json | 15 ---- packages/enzyme-utilities/tsconfig.json | 15 ++++ packages/function-enhancers/package.json | 4 -- .../function-enhancers/tsconfig.build.json | 15 ---- packages/function-enhancers/tsconfig.json | 15 ++++ packages/graphql-persisted/package.json | 4 -- packages/graphql-persisted/src/apollo.ts | 5 +- .../graphql-persisted/src/tests/utilities.ts | 2 +- .../graphql-persisted/tsconfig.build.json | 15 ---- packages/graphql-persisted/tsconfig.json | 16 +++++ packages/graphql-testing/package.json | 4 -- .../graphql-testing/src/links/inflight.ts | 13 +++- packages/graphql-testing/src/links/mocks.ts | 2 +- .../src/links/tests/utilities.ts | 5 +- packages/graphql-testing/tsconfig.build.json | 15 ---- packages/graphql-testing/tsconfig.json | 15 ++++ packages/i18n/package.json | 4 -- packages/i18n/tsconfig.build.json | 15 ---- packages/i18n/tsconfig.json | 15 ++++ packages/jest-dom-mocks/package.json | 4 -- packages/jest-dom-mocks/tsconfig.build.json | 15 ---- packages/jest-dom-mocks/tsconfig.json | 16 +++++ packages/jest-koa-mocks/package.json | 4 -- packages/jest-koa-mocks/tsconfig.build.json | 15 ---- packages/jest-koa-mocks/tsconfig.json | 15 ++++ packages/jest-mock-apollo/package.json | 4 -- .../jest-mock-apollo/src/MockApolloLink.ts | 5 +- .../jest-mock-apollo/src/graphqlClient.ts | 1 + packages/jest-mock-apollo/tsconfig.build.json | 15 ---- packages/jest-mock-apollo/tsconfig.json | 15 ++++ packages/jest-mock-router/package.json | 4 -- packages/jest-mock-router/tsconfig.build.json | 15 ---- packages/jest-mock-router/tsconfig.json | 15 ++++ packages/koa-liveness-ping/package.json | 4 -- .../koa-liveness-ping/tsconfig.build.json | 15 ---- packages/koa-liveness-ping/tsconfig.json | 5 +- packages/koa-metrics/package.json | 4 -- packages/koa-metrics/tsconfig.build.json | 15 ---- packages/koa-metrics/tsconfig.json | 16 +++++ packages/koa-shopify-auth/package.json | 4 -- packages/koa-shopify-auth/tsconfig.build.json | 15 ---- packages/koa-shopify-auth/tsconfig.json | 16 +++++ .../koa-shopify-graphql-proxy/package.json | 4 -- .../tsconfig.build.json | 15 ---- .../koa-shopify-graphql-proxy/tsconfig.json | 16 +++++ packages/koa-shopify-webhooks/package.json | 4 -- .../koa-shopify-webhooks/tsconfig.build.json | 15 ---- packages/koa-shopify-webhooks/tsconfig.json | 16 +++++ packages/logger/package.json | 4 -- packages/logger/tsconfig.build.json | 15 ---- packages/logger/tsconfig.json | 15 ++++ packages/network/package.json | 4 -- packages/network/tsconfig.build.json | 15 ---- packages/network/tsconfig.json | 15 ++++ packages/performance/package.json | 4 -- packages/performance/src/utilities.ts | 2 + packages/performance/tsconfig.build.json | 15 ---- packages/performance/tsconfig.json | 15 ++++ packages/polyfills/package.json | 5 -- .../polyfills/src/idle-callback.browser.ts | 1 + packages/polyfills/src/idle-callback.jest.ts | 1 + packages/polyfills/tsconfig.build.json | 15 ---- packages/polyfills/tsconfig.json | 15 ++++ packages/predicates/package.json | 4 -- packages/predicates/tsconfig.build.json | 15 ---- packages/predicates/tsconfig.json | 15 ++++ .../package.json | 4 -- .../tsconfig.build.json | 15 ---- .../tsconfig.json | 16 +++++ packages/react-async/package.json | 4 -- packages/react-async/src/Prefetcher.tsx | 2 + packages/react-async/tsconfig.build.json | 15 ---- packages/react-async/tsconfig.json | 23 ++++++ packages/react-compose/package.json | 4 -- packages/react-compose/tsconfig.build.json | 15 ---- packages/react-compose/tsconfig.json | 15 ++++ .../package.json | 4 -- .../tsconfig.build.json | 15 ---- .../tsconfig.json | 19 +++++ packages/react-csrf/package.json | 4 -- packages/react-csrf/tsconfig.build.json | 15 ---- packages/react-csrf/tsconfig.json | 15 ++++ packages/react-effect-apollo/package.json | 4 -- .../{tsconfig.build.json => tsconfig.json} | 2 +- packages/react-effect/package.json | 4 -- packages/react-effect/tsconfig.build.json | 15 ---- packages/react-effect/tsconfig.json | 15 ++++ packages/react-form-state/package.json | 4 -- packages/react-form-state/src/FormState.ts | 1 + packages/react-form-state/tsconfig.build.json | 15 ---- packages/react-form-state/tsconfig.json | 15 ++++ packages/react-form/package.json | 4 -- packages/react-form/tsconfig.build.json | 15 ---- packages/react-form/tsconfig.json | 16 +++++ packages/react-google-analytics/package.json | 4 -- .../tsconfig.build.json | 15 ---- packages/react-google-analytics/tsconfig.json | 15 ++++ .../package.json | 4 -- .../tsconfig.build.json | 15 ---- .../tsconfig.json | 20 ++++++ packages/react-graphql/package.json | 4 -- packages/react-graphql/src/hooks/mutation.ts | 1 + packages/react-graphql/tsconfig.build.json | 15 ---- packages/react-graphql/tsconfig.json | 22 ++++++ packages/react-hooks/package.json | 4 -- packages/react-hooks/tsconfig.build.json | 15 ---- packages/react-hooks/tsconfig.json | 15 ++++ packages/react-html/package.json | 4 -- packages/react-html/tsconfig.build.json | 15 ---- packages/react-html/tsconfig.json | 16 +++++ packages/react-hydrate/package.json | 4 -- packages/react-hydrate/tsconfig.build.json | 15 ---- packages/react-hydrate/tsconfig.json | 16 +++++ .../package.json | 4 -- .../src/I18nUniversalProvider.tsx | 1 + .../tsconfig.build.json | 15 ---- .../tsconfig.json | 16 +++++ packages/react-i18n/package.json | 5 -- packages/react-i18n/tsconfig.build.json | 15 ---- packages/react-i18n/tsconfig.json | 21 ++++++ packages/react-idle/package.json | 4 -- packages/react-idle/tsconfig.build.json | 15 ---- packages/react-idle/tsconfig.json | 15 ++++ packages/react-import-remote/package.json | 4 -- packages/react-import-remote/src/load.ts | 1 + .../react-import-remote/tsconfig.build.json | 15 ---- packages/react-import-remote/tsconfig.json | 16 +++++ .../react-intersection-observer/package.json | 4 -- .../tsconfig.build.json | 15 ---- .../react-intersection-observer/tsconfig.json | 15 ++++ packages/react-network/package.json | 4 -- packages/react-network/tsconfig.build.json | 15 ---- packages/react-network/tsconfig.json | 15 ++++ packages/react-preconnect/tsconfig.json | 15 ++++ packages/react-router/package.json | 4 -- packages/react-router/tsconfig.build.json | 15 ---- packages/react-router/tsconfig.json | 15 ++++ packages/react-self-serializers/package.json | 49 +++++++++++++ packages/react-self-serializers/src/I18n.tsx | 62 ++++++++++++++++ packages/react-self-serializers/tsconfig.json | 20 ++++++ packages/react-serialize/package.json | 4 -- packages/react-serialize/tsconfig.build.json | 15 ---- packages/react-serialize/tsconfig.json | 15 ++++ .../react-server-webpack-plugin/package.json | 4 -- .../react-server-webpack-plugin/tsconfig.json | 16 +++++ packages/react-server/package.json | 4 -- packages/react-server/tsconfig.build.json | 15 ---- packages/react-server/tsconfig.json | 16 +++++ .../package.json | 4 -- .../tsconfig.build.json | 15 ---- .../tsconfig.json | 15 ++++ packages/react-shortcuts/package.json | 4 -- packages/react-shortcuts/tsconfig.build.json | 15 ---- packages/react-shortcuts/tsconfig.json | 15 ++++ packages/react-testing/package.json | 4 -- packages/react-testing/tsconfig.build.json | 15 ---- packages/react-testing/tsconfig.json | 16 +++++ packages/react-tracking-pixel/package.json | 4 -- .../react-tracking-pixel/tsconfig.build.json | 15 ---- packages/react-tracking-pixel/tsconfig.json | 16 +++++ .../react-universal-provider/package.json | 4 -- .../tsconfig.build.json | 15 ---- .../react-universal-provider/tsconfig.json | 16 +++++ packages/semaphore/package.json | 4 -- .../{tsconfig.build.json => tsconfig.json} | 2 +- packages/sewing-kit-koa/package.json | 4 -- packages/sewing-kit-koa/tsconfig.build.json | 15 ---- packages/sewing-kit-koa/tsconfig.json | 16 +++++ packages/tsconfig.json | 71 +++++++++++++++++++ .../tsconfig_base.json | 11 ++- packages/useful-types/package.json | 4 -- packages/useful-types/tsconfig.build.json | 15 ---- packages/useful-types/tsconfig.json | 15 ++++ packages/with-env/package.json | 4 -- packages/with-env/tsconfig.build.json | 15 ---- packages/with-env/tsconfig.json | 15 ++++ script.js | 17 +++++ templates/package.hbs.json | 4 -- templates/tsconfig.build.hbs.json | 2 +- tsconfig.json | 10 --- yarn.lock | 5 ++ 210 files changed, 1195 insertions(+), 1128 deletions(-) rename packages/address-consts/{tsconfig.build.json => tsconfig.json} (87%) create mode 100644 packages/address-mocks/tsconfig.json create mode 100644 packages/address/tsconfig.json rename packages/{address-mocks/tsconfig.build.json => admin-graphql-api-utilities/tsconfig.json} (87%) delete mode 100644 packages/ast-utilities/tsconfig.build.json rename packages/{address/tsconfig.build.json => ast-utilities/tsconfig.json} (87%) delete mode 100644 packages/async/tsconfig.build.json rename packages/{admin-graphql-api-utilities/tsconfig.build.json => async/tsconfig.json} (87%) delete mode 100644 packages/csrf-token-fetcher/tsconfig.build.json create mode 100644 packages/csrf-token-fetcher/tsconfig.json delete mode 100644 packages/css-utilities/tsconfig.build.json create mode 100644 packages/css-utilities/tsconfig.json delete mode 100644 packages/dates/tsconfig.build.json create mode 100644 packages/dates/tsconfig.json delete mode 100644 packages/decorators/tsconfig.build.json create mode 100644 packages/decorators/tsconfig.json delete mode 100644 packages/enzyme-utilities/tsconfig.build.json create mode 100644 packages/enzyme-utilities/tsconfig.json delete mode 100644 packages/function-enhancers/tsconfig.build.json create mode 100644 packages/function-enhancers/tsconfig.json delete mode 100644 packages/graphql-persisted/tsconfig.build.json create mode 100644 packages/graphql-persisted/tsconfig.json delete mode 100644 packages/graphql-testing/tsconfig.build.json create mode 100644 packages/graphql-testing/tsconfig.json delete mode 100644 packages/i18n/tsconfig.build.json create mode 100644 packages/i18n/tsconfig.json delete mode 100644 packages/jest-dom-mocks/tsconfig.build.json create mode 100644 packages/jest-dom-mocks/tsconfig.json delete mode 100644 packages/jest-koa-mocks/tsconfig.build.json create mode 100644 packages/jest-koa-mocks/tsconfig.json delete mode 100644 packages/jest-mock-apollo/tsconfig.build.json create mode 100644 packages/jest-mock-apollo/tsconfig.json delete mode 100644 packages/jest-mock-router/tsconfig.build.json create mode 100644 packages/jest-mock-router/tsconfig.json delete mode 100644 packages/koa-liveness-ping/tsconfig.build.json delete mode 100644 packages/koa-metrics/tsconfig.build.json create mode 100644 packages/koa-metrics/tsconfig.json delete mode 100644 packages/koa-shopify-auth/tsconfig.build.json create mode 100644 packages/koa-shopify-auth/tsconfig.json delete mode 100644 packages/koa-shopify-graphql-proxy/tsconfig.build.json create mode 100644 packages/koa-shopify-graphql-proxy/tsconfig.json delete mode 100644 packages/koa-shopify-webhooks/tsconfig.build.json create mode 100644 packages/koa-shopify-webhooks/tsconfig.json delete mode 100644 packages/logger/tsconfig.build.json create mode 100644 packages/logger/tsconfig.json delete mode 100644 packages/network/tsconfig.build.json create mode 100644 packages/network/tsconfig.json delete mode 100644 packages/performance/tsconfig.build.json create mode 100644 packages/performance/tsconfig.json delete mode 100644 packages/polyfills/tsconfig.build.json create mode 100644 packages/polyfills/tsconfig.json delete mode 100644 packages/predicates/tsconfig.build.json create mode 100644 packages/predicates/tsconfig.json delete mode 100644 packages/react-app-bridge-universal-provider/tsconfig.build.json create mode 100644 packages/react-app-bridge-universal-provider/tsconfig.json delete mode 100644 packages/react-async/tsconfig.build.json create mode 100644 packages/react-async/tsconfig.json delete mode 100644 packages/react-compose/tsconfig.build.json create mode 100644 packages/react-compose/tsconfig.json delete mode 100644 packages/react-csrf-universal-provider/tsconfig.build.json create mode 100644 packages/react-csrf-universal-provider/tsconfig.json delete mode 100644 packages/react-csrf/tsconfig.build.json create mode 100644 packages/react-csrf/tsconfig.json rename packages/react-effect-apollo/{tsconfig.build.json => tsconfig.json} (88%) delete mode 100644 packages/react-effect/tsconfig.build.json create mode 100644 packages/react-effect/tsconfig.json delete mode 100644 packages/react-form-state/tsconfig.build.json create mode 100644 packages/react-form-state/tsconfig.json delete mode 100644 packages/react-form/tsconfig.build.json create mode 100644 packages/react-form/tsconfig.json delete mode 100644 packages/react-google-analytics/tsconfig.build.json create mode 100644 packages/react-google-analytics/tsconfig.json delete mode 100644 packages/react-graphql-universal-provider/tsconfig.build.json create mode 100644 packages/react-graphql-universal-provider/tsconfig.json delete mode 100644 packages/react-graphql/tsconfig.build.json create mode 100644 packages/react-graphql/tsconfig.json delete mode 100644 packages/react-hooks/tsconfig.build.json create mode 100644 packages/react-hooks/tsconfig.json delete mode 100644 packages/react-html/tsconfig.build.json create mode 100644 packages/react-html/tsconfig.json delete mode 100644 packages/react-hydrate/tsconfig.build.json create mode 100644 packages/react-hydrate/tsconfig.json delete mode 100644 packages/react-i18n-universal-provider/tsconfig.build.json create mode 100644 packages/react-i18n-universal-provider/tsconfig.json delete mode 100644 packages/react-i18n/tsconfig.build.json create mode 100644 packages/react-i18n/tsconfig.json delete mode 100644 packages/react-idle/tsconfig.build.json create mode 100644 packages/react-idle/tsconfig.json delete mode 100644 packages/react-import-remote/tsconfig.build.json create mode 100644 packages/react-import-remote/tsconfig.json delete mode 100644 packages/react-intersection-observer/tsconfig.build.json create mode 100644 packages/react-intersection-observer/tsconfig.json delete mode 100644 packages/react-network/tsconfig.build.json create mode 100644 packages/react-network/tsconfig.json create mode 100644 packages/react-preconnect/tsconfig.json delete mode 100644 packages/react-router/tsconfig.build.json create mode 100644 packages/react-router/tsconfig.json create mode 100644 packages/react-self-serializers/package.json create mode 100644 packages/react-self-serializers/src/I18n.tsx create mode 100644 packages/react-self-serializers/tsconfig.json delete mode 100644 packages/react-serialize/tsconfig.build.json create mode 100644 packages/react-serialize/tsconfig.json create mode 100644 packages/react-server-webpack-plugin/tsconfig.json delete mode 100644 packages/react-server/tsconfig.build.json create mode 100644 packages/react-server/tsconfig.json delete mode 100644 packages/react-shopify-app-route-propagator/tsconfig.build.json create mode 100644 packages/react-shopify-app-route-propagator/tsconfig.json delete mode 100644 packages/react-shortcuts/tsconfig.build.json create mode 100644 packages/react-shortcuts/tsconfig.json delete mode 100644 packages/react-testing/tsconfig.build.json create mode 100644 packages/react-testing/tsconfig.json delete mode 100644 packages/react-tracking-pixel/tsconfig.build.json create mode 100644 packages/react-tracking-pixel/tsconfig.json delete mode 100644 packages/react-universal-provider/tsconfig.build.json create mode 100644 packages/react-universal-provider/tsconfig.json rename packages/semaphore/{tsconfig.build.json => tsconfig.json} (86%) delete mode 100644 packages/sewing-kit-koa/tsconfig.build.json create mode 100644 packages/sewing-kit-koa/tsconfig.json create mode 100644 packages/tsconfig.json rename tsconfig.base.json => packages/tsconfig_base.json (66%) delete mode 100644 packages/useful-types/tsconfig.build.json create mode 100644 packages/useful-types/tsconfig.json delete mode 100644 packages/with-env/tsconfig.build.json create mode 100644 packages/with-env/tsconfig.json create mode 100644 script.js delete mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index d1f19f691e..2911890ca1 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,5 @@ lerna-debug.log tmp **/test.log + +*.tsbuildinfo diff --git a/package.json b/package.json index d9a9b079d6..ff5399436b 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,14 @@ "scripts": { "publish": "lerna publish", "prebuild": "yarn run clean", - "build": "lerna run build", + "build": "yarn tsc --build packages", "lint": "eslint '**/*.{ts,tsx}'", "ci:lint-docs": "yarn generate docs && test -z \"$(git status --porcelain)\" || echo 'The root README has not been updated. Run `yarn generate docs` in the root of your quilt directory and try again.'", + "pretest": "yarn run build", "test": "NODE_ICU_DATA=node_modules/full-icu jest --maxWorkers=3 --coverage=false", "check": "lerna run check", "release": "lerna publish", - "clean": "rimraf './packages/*/dist/**/*.{js,d.ts}'", + "clean": "rimraf './packages/*/dist/**/*.{js,d.ts}' './packages/*/*.tsbuildinfo' './packages/*.tsbuildinfo'", "generate": "plop", "generate:package": "plop package && yarn plop docs", "tophat": "tophat" @@ -73,8 +74,12 @@ "rimraf": "^2.6.2", "ts-jest": "^23.10.4", "tslib": "^1.9.3", +<<<<<<< HEAD "typescript": "~3.2.1", "@shopify/tophat": "^0.0.3" +======= + "typescript": "^3.6.2" +>>>>>>> Migrate codebase to use Typescript project references & incremental builds }, "dependencies": {}, "resolutions": { diff --git a/packages/address-consts/package.json b/packages/address-consts/package.json index 47b485e515..ecff22794c 100644 --- a/packages/address-consts/package.json +++ b/packages/address-consts/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/address-consts/tsconfig.build.json b/packages/address-consts/tsconfig.json similarity index 87% rename from packages/address-consts/tsconfig.build.json rename to packages/address-consts/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/address-consts/tsconfig.build.json +++ b/packages/address-consts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/address-mocks/package.json b/packages/address-mocks/package.json index 8ed60620b9..6b8f4ff7f0 100644 --- a/packages/address-mocks/package.json +++ b/packages/address-mocks/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/address-mocks/tsconfig.json b/packages/address-mocks/tsconfig.json new file mode 100644 index 0000000000..dc8c479686 --- /dev/null +++ b/packages/address-mocks/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../address"}, {"path": "../jest-dom-mocks"}] +} diff --git a/packages/address/package.json b/packages/address/package.json index 0dcd416d46..044de56982 100644 --- a/packages/address/package.json +++ b/packages/address/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/address/tsconfig.json b/packages/address/tsconfig.json new file mode 100644 index 0000000000..897bb7fc70 --- /dev/null +++ b/packages/address/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../address-consts"}] +} diff --git a/packages/admin-graphql-api-utilities/package.json b/packages/admin-graphql-api-utilities/package.json index 7b19f7e037..2895ba9301 100644 --- a/packages/admin-graphql-api-utilities/package.json +++ b/packages/admin-graphql-api-utilities/package.json @@ -5,10 +5,6 @@ "description": "A set of utilities to use when consuming Shopify’s admin graphql api.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/address-mocks/tsconfig.build.json b/packages/admin-graphql-api-utilities/tsconfig.json similarity index 87% rename from packages/address-mocks/tsconfig.build.json rename to packages/admin-graphql-api-utilities/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/address-mocks/tsconfig.build.json +++ b/packages/admin-graphql-api-utilities/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/ast-utilities/package.json b/packages/ast-utilities/package.json index 56319f6012..ec6997fe04 100644 --- a/packages/ast-utilities/package.json +++ b/packages/ast-utilities/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/ast-utilities/tsconfig.build.json b/packages/ast-utilities/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/ast-utilities/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/address/tsconfig.build.json b/packages/ast-utilities/tsconfig.json similarity index 87% rename from packages/address/tsconfig.build.json rename to packages/ast-utilities/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/address/tsconfig.build.json +++ b/packages/ast-utilities/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/async/package.json b/packages/async/package.json index 97746ee85b..9674c05dfa 100644 --- a/packages/async/package.json +++ b/packages/async/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/async/tsconfig.build.json b/packages/async/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/async/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/admin-graphql-api-utilities/tsconfig.build.json b/packages/async/tsconfig.json similarity index 87% rename from packages/admin-graphql-api-utilities/tsconfig.build.json rename to packages/async/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/admin-graphql-api-utilities/tsconfig.build.json +++ b/packages/async/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/csrf-token-fetcher/package.json b/packages/csrf-token-fetcher/package.json index 37d4bf65ba..7a50fea3df 100644 --- a/packages/csrf-token-fetcher/package.json +++ b/packages/csrf-token-fetcher/package.json @@ -5,10 +5,6 @@ "description": "JavaScript utility function to fetch the CSRF token required to make requests to a Rails server", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/csrf-token-fetcher/tsconfig.build.json b/packages/csrf-token-fetcher/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/csrf-token-fetcher/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/csrf-token-fetcher/tsconfig.json b/packages/csrf-token-fetcher/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/csrf-token-fetcher/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/css-utilities/package.json b/packages/css-utilities/package.json index 05a8cf5b47..7af40cf220 100644 --- a/packages/css-utilities/package.json +++ b/packages/css-utilities/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/css-utilities/tsconfig.build.json b/packages/css-utilities/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/css-utilities/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/css-utilities/tsconfig.json b/packages/css-utilities/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/css-utilities/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/dates/package.json b/packages/dates/package.json index 16cc25e64b..36fc6d5fa4 100644 --- a/packages/dates/package.json +++ b/packages/dates/package.json @@ -5,10 +5,6 @@ "description": "Lightweight date operations library.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/dates/tsconfig.build.json b/packages/dates/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/dates/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/dates/tsconfig.json b/packages/dates/tsconfig.json new file mode 100644 index 0000000000..7d111b49d6 --- /dev/null +++ b/packages/dates/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../address"}, {"path": "../function-enhancers"}, {"path": "../decorators"}] +} diff --git a/packages/decorators/package.json b/packages/decorators/package.json index e96a3c7f56..ca66356b08 100644 --- a/packages/decorators/package.json +++ b/packages/decorators/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/decorators/tsconfig.build.json b/packages/decorators/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/decorators/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/decorators/tsconfig.json b/packages/decorators/tsconfig.json new file mode 100644 index 0000000000..0a80f11756 --- /dev/null +++ b/packages/decorators/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../address"}, {"path": "../function-enhancers"}] +} diff --git a/packages/enzyme-utilities/package.json b/packages/enzyme-utilities/package.json index a2b0853fd8..08983ce7b0 100644 --- a/packages/enzyme-utilities/package.json +++ b/packages/enzyme-utilities/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/enzyme-utilities/tsconfig.build.json b/packages/enzyme-utilities/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/enzyme-utilities/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/enzyme-utilities/tsconfig.json b/packages/enzyme-utilities/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/enzyme-utilities/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/function-enhancers/package.json b/packages/function-enhancers/package.json index 57e8918b3e..580e74c720 100644 --- a/packages/function-enhancers/package.json +++ b/packages/function-enhancers/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/function-enhancers/tsconfig.build.json b/packages/function-enhancers/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/function-enhancers/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/function-enhancers/tsconfig.json b/packages/function-enhancers/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/function-enhancers/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/graphql-persisted/package.json b/packages/graphql-persisted/package.json index 94d29ac8d9..c6f565ce68 100644 --- a/packages/graphql-persisted/package.json +++ b/packages/graphql-persisted/package.json @@ -4,10 +4,6 @@ "license": "MIT", "description": "Apollo and Koa integrations for persisted GraphQL queries.", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/graphql-persisted/src/apollo.ts b/packages/graphql-persisted/src/apollo.ts index 9df8dbb15f..dce01d05c9 100644 --- a/packages/graphql-persisted/src/apollo.ts +++ b/packages/graphql-persisted/src/apollo.ts @@ -17,7 +17,10 @@ export class PersistedLink extends ApolloLink { super(); } - request(operation: Operation, forward?: NextLink) { + request( + operation: Operation, + forward?: NextLink, + ): Observable | null { if (forward == null) { throw new Error('Persisted link can’t be a terminating link.'); } diff --git a/packages/graphql-persisted/src/tests/utilities.ts b/packages/graphql-persisted/src/tests/utilities.ts index bfeb09ab61..7042863fd1 100644 --- a/packages/graphql-persisted/src/tests/utilities.ts +++ b/packages/graphql-persisted/src/tests/utilities.ts @@ -60,7 +60,7 @@ export class SimpleLink extends ApolloLink { super(); } - request(operation: Operation, nextLink?: NextLink) { + request(operation: Operation, nextLink?: NextLink): Observable { this.beforeResult(operation); if (nextLink != null) { diff --git a/packages/graphql-persisted/tsconfig.build.json b/packages/graphql-persisted/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/graphql-persisted/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/graphql-persisted/tsconfig.json b/packages/graphql-persisted/tsconfig.json new file mode 100644 index 0000000000..fb5345dc3e --- /dev/null +++ b/packages/graphql-persisted/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../sewing-kit-koa"}] +} diff --git a/packages/graphql-testing/package.json b/packages/graphql-testing/package.json index 9c815fb9ac..716ea1bdd7 100644 --- a/packages/graphql-testing/package.json +++ b/packages/graphql-testing/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/graphql-testing/src/links/inflight.ts b/packages/graphql-testing/src/links/inflight.ts index 16580cc2ef..9c843d2a1d 100644 --- a/packages/graphql-testing/src/links/inflight.ts +++ b/packages/graphql-testing/src/links/inflight.ts @@ -1,4 +1,10 @@ -import {ApolloLink, Observable, Operation, NextLink} from 'apollo-link'; +import { + ApolloLink, + Observable, + Operation, + NextLink, + FetchResult, +} from 'apollo-link'; import {MockRequest} from '../types'; @@ -12,7 +18,10 @@ export class InflightLink extends ApolloLink { super(); } - request(operation: Operation, nextLink?: NextLink) { + request( + operation: Operation, + nextLink?: NextLink, + ): Observable | null { if (nextLink == null || !nextLink) { throw new Error('The memory link must not be a terminating link'); } diff --git a/packages/graphql-testing/src/links/mocks.ts b/packages/graphql-testing/src/links/mocks.ts index 6561149f73..616e2b8094 100644 --- a/packages/graphql-testing/src/links/mocks.ts +++ b/packages/graphql-testing/src/links/mocks.ts @@ -8,7 +8,7 @@ export class MockLink extends ApolloLink { super(); } - request(operation: Operation) { + request(operation: Operation): Observable { return new Observable(obs => { const {mock} = this; const {operationName = ''} = operation; diff --git a/packages/graphql-testing/src/links/tests/utilities.ts b/packages/graphql-testing/src/links/tests/utilities.ts index acb23d06e8..787ad78830 100644 --- a/packages/graphql-testing/src/links/tests/utilities.ts +++ b/packages/graphql-testing/src/links/tests/utilities.ts @@ -50,7 +50,10 @@ export class SimpleLink extends ApolloLink { super(); } - request(operation: Operation, nextLink?: NextLink) { + request( + operation: Operation, + nextLink?: NextLink, + ): Observable | null { this.beforeResult(operation); if (nextLink != null) { diff --git a/packages/graphql-testing/tsconfig.build.json b/packages/graphql-testing/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/graphql-testing/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/graphql-testing/tsconfig.json b/packages/graphql-testing/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/graphql-testing/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/i18n/package.json b/packages/i18n/package.json index f7a95c1143..e2e474bac7 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/i18n/tsconfig.build.json b/packages/i18n/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/i18n/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/i18n/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/jest-dom-mocks/package.json b/packages/jest-dom-mocks/package.json index 6a6d9cfae7..f1cda7a4c3 100644 --- a/packages/jest-dom-mocks/package.json +++ b/packages/jest-dom-mocks/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/jest-dom-mocks/tsconfig.build.json b/packages/jest-dom-mocks/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/jest-dom-mocks/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/jest-dom-mocks/tsconfig.json b/packages/jest-dom-mocks/tsconfig.json new file mode 100644 index 0000000000..cdfa02fef9 --- /dev/null +++ b/packages/jest-dom-mocks/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../async"}, {"path": "../decorators"}] +} diff --git a/packages/jest-koa-mocks/package.json b/packages/jest-koa-mocks/package.json index a6df6b095d..13ce78e70d 100644 --- a/packages/jest-koa-mocks/package.json +++ b/packages/jest-koa-mocks/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/jest-koa-mocks/tsconfig.build.json b/packages/jest-koa-mocks/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/jest-koa-mocks/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/jest-koa-mocks/tsconfig.json b/packages/jest-koa-mocks/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/jest-koa-mocks/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/jest-mock-apollo/package.json b/packages/jest-mock-apollo/package.json index 3c4d129f26..da6f055898 100644 --- a/packages/jest-mock-apollo/package.json +++ b/packages/jest-mock-apollo/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/jest-mock-apollo/src/MockApolloLink.ts b/packages/jest-mock-apollo/src/MockApolloLink.ts index 4752350a0d..b39bbad3cd 100644 --- a/packages/jest-mock-apollo/src/MockApolloLink.ts +++ b/packages/jest-mock-apollo/src/MockApolloLink.ts @@ -1,4 +1,5 @@ -import {ApolloLink, Observable, Operation} from 'apollo-link'; +import {ApolloLink, Observable, Operation, NextLink} from 'apollo-link'; + import { GraphQLType, ExecutionResult, @@ -20,7 +21,7 @@ export default class MockApolloLink extends ApolloLink { super(); } - request(operation: Operation) { + request(operation: Operation, _forward?: NextLink): Observable { return new Observable(obs => { const {mock} = this; const {operationName = ''} = operation; diff --git a/packages/jest-mock-apollo/src/graphqlClient.ts b/packages/jest-mock-apollo/src/graphqlClient.ts index f24368f409..877c2760d7 100644 --- a/packages/jest-mock-apollo/src/graphqlClient.ts +++ b/packages/jest-mock-apollo/src/graphqlClient.ts @@ -67,6 +67,7 @@ export default function configureClient({ }); const client = new ApolloClient({ + // @ts-ignore link: memoryLink.concat(mockLink), cache, }) as MockGraphQLClient; diff --git a/packages/jest-mock-apollo/tsconfig.build.json b/packages/jest-mock-apollo/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/jest-mock-apollo/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/jest-mock-apollo/tsconfig.json b/packages/jest-mock-apollo/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/jest-mock-apollo/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/jest-mock-router/package.json b/packages/jest-mock-router/package.json index 2c624a2656..f248952425 100644 --- a/packages/jest-mock-router/package.json +++ b/packages/jest-mock-router/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/jest-mock-router/tsconfig.build.json b/packages/jest-mock-router/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/jest-mock-router/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/jest-mock-router/tsconfig.json b/packages/jest-mock-router/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/jest-mock-router/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/koa-liveness-ping/package.json b/packages/koa-liveness-ping/package.json index 7b6e8f1f93..ed8625628c 100644 --- a/packages/koa-liveness-ping/package.json +++ b/packages/koa-liveness-ping/package.json @@ -5,10 +5,6 @@ "description": "A package for creating a liveness ping middleware for use with koa", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-liveness-ping/tsconfig.build.json b/packages/koa-liveness-ping/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/koa-liveness-ping/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/koa-liveness-ping/tsconfig.json b/packages/koa-liveness-ping/tsconfig.json index e836cbeb4e..301c2caf22 100644 --- a/packages/koa-liveness-ping/tsconfig.json +++ b/packages/koa-liveness-ping/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", @@ -11,5 +11,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../jest-koa-mocks"}] } diff --git a/packages/koa-metrics/package.json b/packages/koa-metrics/package.json index 67805526c2..46337098cb 100644 --- a/packages/koa-metrics/package.json +++ b/packages/koa-metrics/package.json @@ -5,10 +5,6 @@ "description": "Aims to provide standard middlewares and instrumentation tooling for metrics in Koa.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-metrics/tsconfig.build.json b/packages/koa-metrics/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/koa-metrics/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/koa-metrics/tsconfig.json b/packages/koa-metrics/tsconfig.json new file mode 100644 index 0000000000..78a21fd98d --- /dev/null +++ b/packages/koa-metrics/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../jest-koa-mocks"}, {"path": "../with-env"}] +} diff --git a/packages/koa-shopify-auth/package.json b/packages/koa-shopify-auth/package.json index 9a72f45812..32cc8fd07b 100644 --- a/packages/koa-shopify-auth/package.json +++ b/packages/koa-shopify-auth/package.json @@ -9,10 +9,6 @@ "access": "public", "@shopify:registry": "https://registry.npmjs.org" }, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "author": "Shopify Inc.", "repository": { "type": "git", diff --git a/packages/koa-shopify-auth/tsconfig.build.json b/packages/koa-shopify-auth/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/koa-shopify-auth/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/koa-shopify-auth/tsconfig.json b/packages/koa-shopify-auth/tsconfig.json new file mode 100644 index 0000000000..f9fe35eb2a --- /dev/null +++ b/packages/koa-shopify-auth/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../jest-koa-mocks"}, {"path": "../network"}] +} diff --git a/packages/koa-shopify-graphql-proxy/package.json b/packages/koa-shopify-graphql-proxy/package.json index 4ad9e6ec47..50c4aa43f6 100644 --- a/packages/koa-shopify-graphql-proxy/package.json +++ b/packages/koa-shopify-graphql-proxy/package.json @@ -5,10 +5,6 @@ "description": "A wrapper around koa-better-http-proxy which allows easy proxying of graphql requests from an embedded shopify app.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-shopify-graphql-proxy/tsconfig.build.json b/packages/koa-shopify-graphql-proxy/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/koa-shopify-graphql-proxy/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/koa-shopify-graphql-proxy/tsconfig.json b/packages/koa-shopify-graphql-proxy/tsconfig.json new file mode 100644 index 0000000000..301c2caf22 --- /dev/null +++ b/packages/koa-shopify-graphql-proxy/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../jest-koa-mocks"}] +} diff --git a/packages/koa-shopify-webhooks/package.json b/packages/koa-shopify-webhooks/package.json index 736b8f5c8d..38a673f083 100644 --- a/packages/koa-shopify-webhooks/package.json +++ b/packages/koa-shopify-webhooks/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-shopify-webhooks/tsconfig.build.json b/packages/koa-shopify-webhooks/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/koa-shopify-webhooks/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/koa-shopify-webhooks/tsconfig.json b/packages/koa-shopify-webhooks/tsconfig.json new file mode 100644 index 0000000000..1842f0ea07 --- /dev/null +++ b/packages/koa-shopify-webhooks/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../jest-koa-mocks"}, {"path": "../jest-dom-mocks"}] +} diff --git a/packages/logger/package.json b/packages/logger/package.json index 3d4f6fb2c3..597181fd1b 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -5,10 +5,6 @@ "description": "Opinionated logger for production-scale applications", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/logger/tsconfig.build.json b/packages/logger/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/logger/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/logger/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/network/package.json b/packages/network/package.json index f301fdf51c..e2b6c04564 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/network/tsconfig.build.json b/packages/network/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/network/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/network/tsconfig.json b/packages/network/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/network/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/performance/package.json b/packages/performance/package.json index 3de5b73f87..b5c66fe123 100644 --- a/packages/performance/package.json +++ b/packages/performance/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/performance/src/utilities.ts b/packages/performance/src/utilities.ts index e2a4f775a1..8701febe0d 100644 --- a/packages/performance/src/utilities.ts +++ b/packages/performance/src/utilities.ts @@ -29,6 +29,7 @@ export function withEntriesOfType( ) { try { const initialEntries = performance.getEntriesByType(type); + // @ts-ignore initialEntries.forEach(entry => handler(entry)); if (!hasGlobal('PerformanceObserver')) { @@ -36,6 +37,7 @@ export function withEntriesOfType( } const observer = new PerformanceObserver(entries => { + // @ts-ignore entries.getEntriesByType(type).forEach(entry => handler(entry)); }); diff --git a/packages/performance/tsconfig.build.json b/packages/performance/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/performance/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/performance/tsconfig.json b/packages/performance/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/performance/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 79c55c3147..acd4f2afaa 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -6,11 +6,6 @@ "sideEffects": true, "main": "./dist/index.js", "types": "./dist/index.d.ts", - "scripts": { - "build": "yarn run clean && tsc --p tsconfig.build.json", - "clean": "rimraf 'dist'", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/polyfills/src/idle-callback.browser.ts b/packages/polyfills/src/idle-callback.browser.ts index 7ec1f00a5c..150277c22d 100644 --- a/packages/polyfills/src/idle-callback.browser.ts +++ b/packages/polyfills/src/idle-callback.browser.ts @@ -29,6 +29,7 @@ function fallbackQueueingFunction(cb: IdleCallback) { }); } +// @ts-ignore const extendedWindow = window as PolyfilledWindow; extendedWindow.requestIdleCallback = diff --git a/packages/polyfills/src/idle-callback.jest.ts b/packages/polyfills/src/idle-callback.jest.ts index 38d1717822..458339ff2f 100644 --- a/packages/polyfills/src/idle-callback.jest.ts +++ b/packages/polyfills/src/idle-callback.jest.ts @@ -30,6 +30,7 @@ function fallbackQueueingFunction(cb: IdleCallback) { } if (typeof window !== 'undefined') { + // @ts-ignore const extendedWindow = window as PolyfilledWindow; extendedWindow.requestIdleCallback = diff --git a/packages/polyfills/tsconfig.build.json b/packages/polyfills/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/polyfills/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/polyfills/tsconfig.json b/packages/polyfills/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/polyfills/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/predicates/package.json b/packages/predicates/package.json index e81fe9a30e..d9defa54a4 100644 --- a/packages/predicates/package.json +++ b/packages/predicates/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/predicates/tsconfig.build.json b/packages/predicates/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/predicates/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/predicates/tsconfig.json b/packages/predicates/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/predicates/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-app-bridge-universal-provider/package.json b/packages/react-app-bridge-universal-provider/package.json index d92fae62f6..75ad042d9a 100644 --- a/packages/react-app-bridge-universal-provider/package.json +++ b/packages/react-app-bridge-universal-provider/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-app-bridge-universal-provider/tsconfig.build.json b/packages/react-app-bridge-universal-provider/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-app-bridge-universal-provider/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-app-bridge-universal-provider/tsconfig.json b/packages/react-app-bridge-universal-provider/tsconfig.json new file mode 100644 index 0000000000..16d4257dd3 --- /dev/null +++ b/packages/react-app-bridge-universal-provider/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-html"}] +} diff --git a/packages/react-async/package.json b/packages/react-async/package.json index 3252b85c42..7e387ce1de 100644 --- a/packages/react-async/package.json +++ b/packages/react-async/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-async/src/Prefetcher.tsx b/packages/react-async/src/Prefetcher.tsx index b9058ea576..08f8c48d98 100644 --- a/packages/react-async/src/Prefetcher.tsx +++ b/packages/react-async/src/Prefetcher.tsx @@ -118,11 +118,13 @@ class ConnectedPrefetcher extends React.PureComponent { if ( timeout != null && urlsEqual(closestUrl, timeoutUrl) && + // @ts-ignore !urlsEqual(relatedUrl, timeoutUrl) ) { this.clearTimeout(); } + // @ts-ignore if (urlsEqual(closestUrl, url) && !urlsEqual(relatedUrl, url)) { this.setState({url: undefined}); } diff --git a/packages/react-async/tsconfig.build.json b/packages/react-async/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-async/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-async/tsconfig.json b/packages/react-async/tsconfig.json new file mode 100644 index 0000000000..00ab2f08f9 --- /dev/null +++ b/packages/react-async/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [ + {"path": "../react-effect"}, + {"path": "../react-hooks"}, + {"path": "../useful-types"}, + {"path": "../react-idle"}, + {"path": "../react-intersection-observer"}, + {"path": "../react-hydrate"} + ] +} diff --git a/packages/react-compose/package.json b/packages/react-compose/package.json index 4432a0e786..a1fbaec09d 100644 --- a/packages/react-compose/package.json +++ b/packages/react-compose/package.json @@ -5,10 +5,6 @@ "description": "Cleanly compose multiple component enhancers together with minimal fuss", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-compose/tsconfig.build.json b/packages/react-compose/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-compose/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-compose/tsconfig.json b/packages/react-compose/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-compose/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-csrf-universal-provider/package.json b/packages/react-csrf-universal-provider/package.json index 58366c6871..b97ca68cdf 100644 --- a/packages/react-csrf-universal-provider/package.json +++ b/packages/react-csrf-universal-provider/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-csrf-universal-provider/tsconfig.build.json b/packages/react-csrf-universal-provider/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-csrf-universal-provider/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-csrf-universal-provider/tsconfig.json b/packages/react-csrf-universal-provider/tsconfig.json new file mode 100644 index 0000000000..5df60b2a71 --- /dev/null +++ b/packages/react-csrf-universal-provider/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [ + {"path": "../react-universal-provider"}, + {"path": "../react-csrf"} + ] +} diff --git a/packages/react-csrf/package.json b/packages/react-csrf/package.json index f12ba79c15..016c718f14 100644 --- a/packages/react-csrf/package.json +++ b/packages/react-csrf/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-csrf/tsconfig.build.json b/packages/react-csrf/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-csrf/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-csrf/tsconfig.json b/packages/react-csrf/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-csrf/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-effect-apollo/package.json b/packages/react-effect-apollo/package.json index 46855945a3..dbb0f3725e 100644 --- a/packages/react-effect-apollo/package.json +++ b/packages/react-effect-apollo/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-effect-apollo/tsconfig.build.json b/packages/react-effect-apollo/tsconfig.json similarity index 88% rename from packages/react-effect-apollo/tsconfig.build.json rename to packages/react-effect-apollo/tsconfig.json index c258a0379d..79fc225de2 100644 --- a/packages/react-effect-apollo/tsconfig.build.json +++ b/packages/react-effect-apollo/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/react-effect/package.json b/packages/react-effect/package.json index d0077551c3..bd2627d99d 100644 --- a/packages/react-effect/package.json +++ b/packages/react-effect/package.json @@ -5,10 +5,6 @@ "description": "A component and set of utilities for performing effects within a universal React app", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-effect/tsconfig.build.json b/packages/react-effect/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-effect/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-effect/tsconfig.json b/packages/react-effect/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-effect/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-form-state/package.json b/packages/react-form-state/package.json index 88380a9ea1..a7c3c60eb7 100644 --- a/packages/react-form-state/package.json +++ b/packages/react-form-state/package.json @@ -5,10 +5,6 @@ "description": "Manage react forms tersely and type-safe with no magic.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-form-state/src/FormState.ts b/packages/react-form-state/src/FormState.ts index f6150be16a..58f513a580 100644 --- a/packages/react-form-state/src/FormState.ts +++ b/packages/react-form-state/src/FormState.ts @@ -396,6 +396,7 @@ export default class FormState< const {validators = {}} = this.props; const {fields} = this.state; + // @ts-ignore return runValidator(validators[fieldPath], value, fields); } diff --git a/packages/react-form-state/tsconfig.build.json b/packages/react-form-state/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-form-state/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-form-state/tsconfig.json b/packages/react-form-state/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-form-state/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-form/package.json b/packages/react-form/package.json index 4cf06e1481..8cdf2c06b4 100644 --- a/packages/react-form/package.json +++ b/packages/react-form/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-form/tsconfig.build.json b/packages/react-form/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-form/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-form/tsconfig.json b/packages/react-form/tsconfig.json new file mode 100644 index 0000000000..fe1497bd2a --- /dev/null +++ b/packages/react-form/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-hooks"}, {"path": "../predicates"}] +} diff --git a/packages/react-google-analytics/package.json b/packages/react-google-analytics/package.json index 41e451cb8a..b40e39c09a 100644 --- a/packages/react-google-analytics/package.json +++ b/packages/react-google-analytics/package.json @@ -5,10 +5,6 @@ "description": "Google Analytics", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-google-analytics/tsconfig.build.json b/packages/react-google-analytics/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-google-analytics/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-google-analytics/tsconfig.json b/packages/react-google-analytics/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-google-analytics/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-graphql-universal-provider/package.json b/packages/react-graphql-universal-provider/package.json index d130184e7e..59f29e5af9 100644 --- a/packages/react-graphql-universal-provider/package.json +++ b/packages/react-graphql-universal-provider/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-graphql-universal-provider/tsconfig.build.json b/packages/react-graphql-universal-provider/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-graphql-universal-provider/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-graphql-universal-provider/tsconfig.json b/packages/react-graphql-universal-provider/tsconfig.json new file mode 100644 index 0000000000..2643859078 --- /dev/null +++ b/packages/react-graphql-universal-provider/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [ + {"path": "../react-html"}, + {"path": "../react-graphql"}, + {"path": "../react-hooks"} + ] +} diff --git a/packages/react-graphql/package.json b/packages/react-graphql/package.json index a184ef3a76..f39268f0ae 100644 --- a/packages/react-graphql/package.json +++ b/packages/react-graphql/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-graphql/src/hooks/mutation.ts b/packages/react-graphql/src/hooks/mutation.ts index 8de080fdaf..119447776f 100644 --- a/packages/react-graphql/src/hooks/mutation.ts +++ b/packages/react-graphql/src/hooks/mutation.ts @@ -59,5 +59,6 @@ export default function useMutation( ], ); + // @ts-ignore return runMutation; } diff --git a/packages/react-graphql/tsconfig.build.json b/packages/react-graphql/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-graphql/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-graphql/tsconfig.json b/packages/react-graphql/tsconfig.json new file mode 100644 index 0000000000..f2e3498701 --- /dev/null +++ b/packages/react-graphql/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [ + {"path": "../react-async"}, + {"path": "../react-hooks"}, + {"path": "../react-testing"}, + {"path": "../react-idle"}, + {"path": "../useful-types"} + ] +} diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index 7fb9da7bcf..620aa13648 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-hooks/tsconfig.build.json b/packages/react-hooks/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-hooks/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-hooks/tsconfig.json b/packages/react-hooks/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-hooks/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-html/package.json b/packages/react-html/package.json index 6a0e851a97..3732b9b551 100644 --- a/packages/react-html/package.json +++ b/packages/react-html/package.json @@ -5,10 +5,6 @@ "description": "A component to render your react app with no static HTML.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-html/tsconfig.build.json b/packages/react-html/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-html/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-html/tsconfig.json b/packages/react-html/tsconfig.json new file mode 100644 index 0000000000..e2d5354b97 --- /dev/null +++ b/packages/react-html/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-testing"}, {"path": "../react-hydrate"}] +} diff --git a/packages/react-hydrate/package.json b/packages/react-hydrate/package.json index 6435f4510d..e86eda0e30 100644 --- a/packages/react-hydrate/package.json +++ b/packages/react-hydrate/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-hydrate/tsconfig.build.json b/packages/react-hydrate/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-hydrate/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-hydrate/tsconfig.json b/packages/react-hydrate/tsconfig.json new file mode 100644 index 0000000000..df307c5e09 --- /dev/null +++ b/packages/react-hydrate/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-effect"}, {"path": "../react-hooks"}] +} diff --git a/packages/react-i18n-universal-provider/package.json b/packages/react-i18n-universal-provider/package.json index d58a611eed..3273f2683d 100644 --- a/packages/react-i18n-universal-provider/package.json +++ b/packages/react-i18n-universal-provider/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx b/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx index 7954c56ed8..dbab1d55cc 100644 --- a/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx +++ b/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx @@ -25,6 +25,7 @@ export function I18nUniversalProvider({ const [serialized, Serialize] = useSerialized('i18n'); const i18nDetails: I18nDetails = { + // @ts-ignore locale: explicitI18nDetails.fallbackLocale || 'en', ...(serialized ? serialized : {}), ...explicitI18nDetails, diff --git a/packages/react-i18n-universal-provider/tsconfig.build.json b/packages/react-i18n-universal-provider/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-i18n-universal-provider/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-i18n-universal-provider/tsconfig.json b/packages/react-i18n-universal-provider/tsconfig.json new file mode 100644 index 0000000000..7fea159878 --- /dev/null +++ b/packages/react-i18n-universal-provider/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-i18n"}] +} diff --git a/packages/react-i18n/package.json b/packages/react-i18n/package.json index 4da3740ac1..617bd85a5a 100644 --- a/packages/react-i18n/package.json +++ b/packages/react-i18n/package.json @@ -5,11 +5,6 @@ "description": "i18n utilities for React handling translations, formatting, and more.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build", - "test": "jest --config ./config/jest/config.json" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-i18n/tsconfig.build.json b/packages/react-i18n/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-i18n/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-i18n/tsconfig.json b/packages/react-i18n/tsconfig.json new file mode 100644 index 0000000000..477720784d --- /dev/null +++ b/packages/react-i18n/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [ + {"path": "../function-enhancers"}, + {"path": "../decorators"}, + {"path": "../i18n"}, + {"path": "../dates"} + ] +} diff --git a/packages/react-idle/package.json b/packages/react-idle/package.json index a7cb418897..49c8947ab2 100644 --- a/packages/react-idle/package.json +++ b/packages/react-idle/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-idle/tsconfig.build.json b/packages/react-idle/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-idle/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-idle/tsconfig.json b/packages/react-idle/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-idle/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-import-remote/package.json b/packages/react-import-remote/package.json index 47d5e4edd8..d661ec2bd9 100644 --- a/packages/react-import-remote/package.json +++ b/packages/react-import-remote/package.json @@ -5,10 +5,6 @@ "description": "Asynchronous script loading for React", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-import-remote/src/load.ts b/packages/react-import-remote/src/load.ts index db11cf1689..792f145902 100644 --- a/packages/react-import-remote/src/load.ts +++ b/packages/react-import-remote/src/load.ts @@ -27,6 +27,7 @@ export default function load< function scriptTagOnLoad() { scriptTag.removeEventListener('load', scriptTagOnLoad); scriptTag.removeEventListener('error', scriptTagOnError); + // @ts-ignore resolve(getImport(window as CustomWindow)); } diff --git a/packages/react-import-remote/tsconfig.build.json b/packages/react-import-remote/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-import-remote/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-import-remote/tsconfig.json b/packages/react-import-remote/tsconfig.json new file mode 100644 index 0000000000..16d4257dd3 --- /dev/null +++ b/packages/react-import-remote/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-html"}] +} diff --git a/packages/react-intersection-observer/package.json b/packages/react-intersection-observer/package.json index 9570856a11..db527e2188 100644 --- a/packages/react-intersection-observer/package.json +++ b/packages/react-intersection-observer/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-intersection-observer/tsconfig.build.json b/packages/react-intersection-observer/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-intersection-observer/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-intersection-observer/tsconfig.json b/packages/react-intersection-observer/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-intersection-observer/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-network/package.json b/packages/react-network/package.json index dd7fddc542..fbd73c0a92 100644 --- a/packages/react-network/package.json +++ b/packages/react-network/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-network/tsconfig.build.json b/packages/react-network/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-network/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-network/tsconfig.json b/packages/react-network/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-network/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-preconnect/tsconfig.json b/packages/react-preconnect/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-preconnect/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 71e8cd97f5..2716ea83ba 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-router/tsconfig.build.json b/packages/react-router/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-router/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-router/tsconfig.json b/packages/react-router/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-router/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-self-serializers/package.json b/packages/react-self-serializers/package.json new file mode 100644 index 0000000000..ba629bc5cc --- /dev/null +++ b/packages/react-self-serializers/package.json @@ -0,0 +1,49 @@ +{ + "name": "@shopify/react-self-serializers", + "version": "1.3.15", + "license": "MIT", + "description": "A set of self-serializing providers for @shopify/react-html applications", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "sideEffects": false, + "publishConfig": { + "access": "public", + "@shopify:registry": "https://registry.npmjs.org" + }, + "author": "Shopify Inc.", + "repository": { + "type": "git", + "url": "git+https://github.com/Shopify/quilt.git" + }, + "bugs": { + "url": "https://github.com/shopify/quilt/issues" + }, + "homepage": "https://github.com/Shopify/quilt/blob/master/packages/react-self-serializers/README.md", + "devDependencies": { + "@shopify/app-bridge-react": "^1.6.7", + "@shopify/react-graphql": "^5.1.3", + "@shopify/react-html": "^8.1.3", + "@shopify/react-i18n": "^1.8.2", + "@shopify/react-testing": "^1.7.8", + "@types/faker": "4.1.5", + "faker": "^4.1.0" + }, + "peerDependencies": { + "@shopify/app-bridge-react": ">=1.5.0", + "@shopify/react-graphql": ">=4.0.3", + "@shopify/react-html": ">=2.0.0", + "@shopify/react-i18n": ">=1.2.3", + "react": ">=16.8.0" + }, + "files": [ + "dist/*", + "AppBridge.js", + "AppBridge.d.ts", + "create-self-serializer.js", + "create-self-serializer.d.ts", + "GraphQL.js", + "GraphQL.d.ts", + "I18n.js", + "I18n.d.ts" + ] +} diff --git a/packages/react-self-serializers/src/I18n.tsx b/packages/react-self-serializers/src/I18n.tsx new file mode 100644 index 0000000000..510871ab55 --- /dev/null +++ b/packages/react-self-serializers/src/I18n.tsx @@ -0,0 +1,62 @@ +import React, {useRef} from 'react'; + +import {useSerialized, useHtmlAttributes} from '@shopify/react-html'; +import {I18nContext, I18nDetails, I18nManager} from '@shopify/react-i18n'; + +interface Props extends Partial { + children?: React.ReactNode; +} + +interface Serialized { + i18nDetails: I18nDetails; + translations: ReturnType; +} + +/** + * A self-serializing provider for `@shopify/i18n`'s I18nManager. + * On the server it serializes it's props to the DOM, on the client it retrieves the serialized props and rehydrates using them. + * + * @param props an object containing the React children to render and any options to use when configuring the `I18nManager` to provide to the tree + * @returns JSX wrapping the given children in an `` and a `` component. + */ +export function I18n({children, ...givenI18nDetails}: Props) { + const [serialized, Serialize] = useSerialized('i18n'); + + const i18nDetails: I18nDetails = { + // @ts-ignore + locale: givenI18nDetails.fallbackLocale || 'en', + ...givenI18nDetails, + ...(serialized ? serialized.i18nDetails : {}), + }; + + const manager = useRef( + new I18nManager( + i18nDetails, + serialized ? serialized.translations : undefined, + ), + ); + + useHtmlAttributes({lang: i18nDetails.locale}); + + return ( + <> + + {children} + + { + const getData = () => ({ + translations: manager.current.extract(), + i18nDetails, + }); + + if (manager.current.loading) { + return manager.current.resolve().then(getData); + } + + return getData(); + }} + /> + + ); +} diff --git a/packages/react-self-serializers/tsconfig.json b/packages/react-self-serializers/tsconfig.json new file mode 100644 index 0000000000..c4ab4cc39a --- /dev/null +++ b/packages/react-self-serializers/tsconfig.json @@ -0,0 +1,20 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [ + {"path": "../react-graphql"}, + {"path": "../react-html"}, + {"path": "../react-hooks"} + ] +} diff --git a/packages/react-serialize/package.json b/packages/react-serialize/package.json index 791b0c1819..1886e0c9a5 100644 --- a/packages/react-serialize/package.json +++ b/packages/react-serialize/package.json @@ -5,10 +5,6 @@ "description": "Provides an idiomatic way to serialize data for rehydration in a universal react application.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-serialize/tsconfig.build.json b/packages/react-serialize/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-serialize/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-serialize/tsconfig.json b/packages/react-serialize/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-serialize/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-server-webpack-plugin/package.json b/packages/react-server-webpack-plugin/package.json index 1d576be7a9..707b28d6d3 100644 --- a/packages/react-server-webpack-plugin/package.json +++ b/packages/react-server-webpack-plugin/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-server-webpack-plugin/tsconfig.json b/packages/react-server-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..01a3700833 --- /dev/null +++ b/packages/react-server-webpack-plugin/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-testing"}] +} diff --git a/packages/react-server/package.json b/packages/react-server/package.json index a43ead4a31..797610e692 100644 --- a/packages/react-server/package.json +++ b/packages/react-server/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-server/tsconfig.build.json b/packages/react-server/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-server/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-server/tsconfig.json b/packages/react-server/tsconfig.json new file mode 100644 index 0000000000..a2c38cb71b --- /dev/null +++ b/packages/react-server/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-async"}, {"path": "../sewing-kit-koa"}] +} diff --git a/packages/react-shopify-app-route-propagator/package.json b/packages/react-shopify-app-route-propagator/package.json index d4e236f135..b2b02d0680 100644 --- a/packages/react-shopify-app-route-propagator/package.json +++ b/packages/react-shopify-app-route-propagator/package.json @@ -5,10 +5,6 @@ "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-shopify-app-route-propagator/tsconfig.build.json b/packages/react-shopify-app-route-propagator/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-shopify-app-route-propagator/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-shopify-app-route-propagator/tsconfig.json b/packages/react-shopify-app-route-propagator/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-shopify-app-route-propagator/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-shortcuts/package.json b/packages/react-shortcuts/package.json index c9b43d01b9..e518d22cf6 100644 --- a/packages/react-shortcuts/package.json +++ b/packages/react-shortcuts/package.json @@ -5,10 +5,6 @@ "description": "Declaratively and efficiently match shortcut combinations in your react application", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-shortcuts/tsconfig.build.json b/packages/react-shortcuts/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-shortcuts/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-shortcuts/tsconfig.json b/packages/react-shortcuts/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/react-shortcuts/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/react-testing/package.json b/packages/react-testing/package.json index 1b3e7980b3..ff236d494c 100644 --- a/packages/react-testing/package.json +++ b/packages/react-testing/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-testing/tsconfig.build.json b/packages/react-testing/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-testing/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-testing/tsconfig.json b/packages/react-testing/tsconfig.json new file mode 100644 index 0000000000..3209f9dcad --- /dev/null +++ b/packages/react-testing/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../useful-types"}] +} diff --git a/packages/react-tracking-pixel/package.json b/packages/react-tracking-pixel/package.json index c9097b0be1..7c0d80f260 100644 --- a/packages/react-tracking-pixel/package.json +++ b/packages/react-tracking-pixel/package.json @@ -5,10 +5,6 @@ "description": "Allows React apps to easily embed tracking pixel iframes", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-tracking-pixel/tsconfig.build.json b/packages/react-tracking-pixel/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-tracking-pixel/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-tracking-pixel/tsconfig.json b/packages/react-tracking-pixel/tsconfig.json new file mode 100644 index 0000000000..16d4257dd3 --- /dev/null +++ b/packages/react-tracking-pixel/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-html"}] +} diff --git a/packages/react-universal-provider/package.json b/packages/react-universal-provider/package.json index 39f0515bd5..325a0991a4 100644 --- a/packages/react-universal-provider/package.json +++ b/packages/react-universal-provider/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-universal-provider/tsconfig.build.json b/packages/react-universal-provider/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/react-universal-provider/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-universal-provider/tsconfig.json b/packages/react-universal-provider/tsconfig.json new file mode 100644 index 0000000000..16d4257dd3 --- /dev/null +++ b/packages/react-universal-provider/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-html"}] +} diff --git a/packages/semaphore/package.json b/packages/semaphore/package.json index 5f58707e81..9e2c56e178 100644 --- a/packages/semaphore/package.json +++ b/packages/semaphore/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/semaphore/tsconfig.build.json b/packages/semaphore/tsconfig.json similarity index 86% rename from packages/semaphore/tsconfig.build.json rename to packages/semaphore/tsconfig.json index ac90b03fee..f623229fc7 100644 --- a/packages/semaphore/tsconfig.build.json +++ b/packages/semaphore/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/sewing-kit-koa/package.json b/packages/sewing-kit-koa/package.json index 5012799e73..72118bb071 100644 --- a/packages/sewing-kit-koa/package.json +++ b/packages/sewing-kit-koa/package.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/sewing-kit-koa/tsconfig.build.json b/packages/sewing-kit-koa/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/sewing-kit-koa/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/sewing-kit-koa/tsconfig.json b/packages/sewing-kit-koa/tsconfig.json new file mode 100644 index 0000000000..bd406ee2c4 --- /dev/null +++ b/packages/sewing-kit-koa/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../network"}] +} diff --git a/packages/tsconfig.json b/packages/tsconfig.json new file mode 100644 index 0000000000..bee93e4cb9 --- /dev/null +++ b/packages/tsconfig.json @@ -0,0 +1,71 @@ +{ + "files": [], + "include": [], + "references": [ + {"path": "./address"}, + {"path": "./address-consts"}, + {"path": "./address-mocks"}, + {"path": "./admin-graphql-api-utilities"}, + {"path": "./ast-utilities"}, + {"path": "./async"}, + {"path": "./csrf-token-fetcher"}, + {"path": "./css-utilities"}, + {"path": "./dates"}, + {"path": "./decorators"}, + {"path": "./enzyme-utilities"}, + {"path": "./function-enhancers"}, + {"path": "./graphql-persisted"}, + {"path": "./graphql-testing"}, + {"path": "./i18n"}, + {"path": "./jest-dom-mocks"}, + {"path": "./jest-koa-mocks"}, + {"path": "./jest-mock-apollo"}, + {"path": "./jest-mock-router"}, + {"path": "./koa-liveness-ping"}, + {"path": "./koa-metrics"}, + {"path": "./koa-shopify-auth"}, + {"path": "./koa-shopify-graphql-proxy"}, + {"path": "./koa-shopify-webhooks"}, + {"path": "./logger"}, + {"path": "./network"}, + {"path": "./performance"}, + {"path": "./polyfills"}, + {"path": "./predicates"}, + {"path": "./react-app-bridge-universal-provider"}, + {"path": "./react-async"}, + {"path": "./react-compose"}, + {"path": "./react-csrf"}, + {"path": "./react-csrf-universal-provider"}, + {"path": "./react-effect"}, + {"path": "./react-effect-apollo"}, + {"path": "./react-form"}, + {"path": "./react-form-state"}, + {"path": "./react-google-analytics"}, + {"path": "./react-graphql"}, + {"path": "./react-graphql-universal-provider"}, + {"path": "./react-hooks"}, + {"path": "./react-html"}, + {"path": "./react-hydrate"}, + {"path": "./react-i18n"}, + {"path": "./react-i18n-universal-provider"}, + {"path": "./react-idle"}, + {"path": "./react-import-remote"}, + {"path": "./react-intersection-observer"}, + {"path": "./react-network"}, + {"path": "./react-preconnect"}, + {"path": "./react-router"}, + {"path": "./react-self-serializers"}, + {"path": "./react-serialize"}, + {"path": "./react-server"}, + {"path": "./react-server-webpack-plugin"}, + {"path": "./react-shopify-app-route-propagator"}, + {"path": "./react-shortcuts"}, + {"path": "./react-testing"}, + {"path": "./react-tracking-pixel"}, + {"path": "./react-universal-provider"}, + {"path": "./semaphore"}, + {"path": "./sewing-kit-koa"}, + {"path": "./useful-types"}, + {"path": "./with-env"} + ] +} diff --git a/tsconfig.base.json b/packages/tsconfig_base.json similarity index 66% rename from tsconfig.base.json rename to packages/tsconfig_base.json index 0245b7487c..d6d68cd834 100644 --- a/tsconfig.base.json +++ b/packages/tsconfig_base.json @@ -1,5 +1,9 @@ { "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "pretty": true, "moduleResolution": "node", "target": "es5", "downlevelIteration": true, @@ -22,8 +26,13 @@ "es2017", "es2018", "esnext.asynciterable" - ] + ], + "typeRoots": ["../node_modules/@types"] }, +<<<<<<< HEAD:tsconfig.base.json "include": ["./config/typescript/**/*.d.ts", "./**/*.ts", "./**/*.tsx"], "exclude": ["./node_modules"] +======= + "include": ["../config/typescript/**/*.d.ts"] +>>>>>>> Migrate codebase to use Typescript project references & incremental builds:packages/tsconfig_base.json } diff --git a/packages/useful-types/package.json b/packages/useful-types/package.json index c9bf459fa5..df401f36bd 100644 --- a/packages/useful-types/package.json +++ b/packages/useful-types/package.json @@ -5,10 +5,6 @@ "description": "A few handy TypeScript types", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/useful-types/tsconfig.build.json b/packages/useful-types/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/useful-types/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/useful-types/tsconfig.json b/packages/useful-types/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/useful-types/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/packages/with-env/package.json b/packages/with-env/package.json index 29fe2babe3..12f56c854c 100644 --- a/packages/with-env/package.json +++ b/packages/with-env/package.json @@ -5,10 +5,6 @@ "description": "A utility for executing code under a specific NODE_ENV.", "main": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/with-env/tsconfig.build.json b/packages/with-env/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/with-env/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/with-env/tsconfig.json b/packages/with-env/tsconfig.json new file mode 100644 index 0000000000..5ee0343fdb --- /dev/null +++ b/packages/with-env/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"] +} diff --git a/script.js b/script.js new file mode 100644 index 0000000000..093c999022 --- /dev/null +++ b/script.js @@ -0,0 +1,17 @@ +const {resolve, basename} = require('path'); +const {renameSync} = require('fs'); +const glob = require('glob'); + +const packages = glob.sync(resolve(__dirname, 'packages/*')); +packages.forEach(path => { + console.log(`{"path": "./${basename(path)}"},`); +}); + +const tsconfigBuild = glob.sync( + resolve(__dirname, 'packages/*/tsconfig.build.json'), +); +// console.log('tsconfigBuild: ', tsconfigBuild); +// tsconfigBuild.forEach(file => { +// console.log('\n\nRenaming file: ', file); +// renameSync(file, file.replace('tsconfig.build.json', 'tsconfig.json')); +// }); diff --git a/templates/package.hbs.json b/templates/package.hbs.json index 3b251be3d1..28cce8d9b6 100644 --- a/templates/package.hbs.json +++ b/templates/package.hbs.json @@ -6,10 +6,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, - "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" - }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/templates/tsconfig.build.hbs.json b/templates/tsconfig.build.hbs.json index e836cbeb4e..5ee0343fdb 100644 --- a/templates/tsconfig.build.hbs.json +++ b/templates/tsconfig.build.hbs.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 935ca7ba0c..0000000000 --- a/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@shopify/react-effect/server": ["packages/react-effect/src/server"], - "@shopify/*": ["packages/*/src/index"] - } - } -} diff --git a/yarn.lock b/yarn.lock index 1093a4dc42..5c8977c019 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10606,6 +10606,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54" + integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw== + typescript@~3.2.1: version "3.2.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.4.tgz#c585cb952912263d915b462726ce244ba510ef3d" From c824b0badc05100c44f64c357bd5fc6a76f15b08 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Wed, 11 Sep 2019 01:22:29 -0400 Subject: [PATCH 02/11] Remove some ts-ignores --- packages/async/src/types.ts | 2 +- packages/jest-mock-apollo/src/graphqlClient.ts | 1 - packages/performance/src/utilities.ts | 8 ++++---- packages/polyfills/src/idle-callback.browser.ts | 4 +--- packages/polyfills/src/idle-callback.jest.ts | 3 +-- packages/react-form-state/src/FormState.ts | 5 +++-- packages/react-graphql/src/hooks/mutation.ts | 3 +-- packages/react-import-remote/src/load.ts | 3 +-- packages/react-server-webpack-plugin/tsconfig.json | 2 +- 9 files changed, 13 insertions(+), 18 deletions(-) diff --git a/packages/async/src/types.ts b/packages/async/src/types.ts index b5d49fd14f..671625c591 100644 --- a/packages/async/src/types.ts +++ b/packages/async/src/types.ts @@ -21,7 +21,7 @@ export type RequestIdleCallback = ( deadline: RequestIdleCallbackDeadline, ) => void; -export interface WindowWithRequestIdleCallback { +export interface WindowWithRequestIdleCallback extends Window { requestIdleCallback( callback: RequestIdleCallback, opts?: RequestIdleCallbackOptions, diff --git a/packages/jest-mock-apollo/src/graphqlClient.ts b/packages/jest-mock-apollo/src/graphqlClient.ts index 877c2760d7..f24368f409 100644 --- a/packages/jest-mock-apollo/src/graphqlClient.ts +++ b/packages/jest-mock-apollo/src/graphqlClient.ts @@ -67,7 +67,6 @@ export default function configureClient({ }); const client = new ApolloClient({ - // @ts-ignore link: memoryLink.concat(mockLink), cache, }) as MockGraphQLClient; diff --git a/packages/performance/src/utilities.ts b/packages/performance/src/utilities.ts index 8701febe0d..784d0ee725 100644 --- a/packages/performance/src/utilities.ts +++ b/packages/performance/src/utilities.ts @@ -29,16 +29,16 @@ export function withEntriesOfType( ) { try { const initialEntries = performance.getEntriesByType(type); - // @ts-ignore - initialEntries.forEach(entry => handler(entry)); + initialEntries.forEach(entry => handler(entry as EntryMap[T])); if (!hasGlobal('PerformanceObserver')) { return; } const observer = new PerformanceObserver(entries => { - // @ts-ignore - entries.getEntriesByType(type).forEach(entry => handler(entry)); + entries + .getEntriesByType(type) + .forEach(entry => handler(entry as EntryMap[T])); }); observer.observe({ diff --git a/packages/polyfills/src/idle-callback.browser.ts b/packages/polyfills/src/idle-callback.browser.ts index 150277c22d..6804f1a967 100644 --- a/packages/polyfills/src/idle-callback.browser.ts +++ b/packages/polyfills/src/idle-callback.browser.ts @@ -8,7 +8,6 @@ interface CallbackParams { didTimeout: boolean; timeRemaining(): number; } - interface PolyfilledWindow extends Window { requestIdleCallback(cb: IdleCallback): any; cancelIdleCallback(): any; @@ -29,8 +28,7 @@ function fallbackQueueingFunction(cb: IdleCallback) { }); } -// @ts-ignore -const extendedWindow = window as PolyfilledWindow; +const extendedWindow = window as PolyfilledWindow & typeof globalThis; extendedWindow.requestIdleCallback = extendedWindow.requestIdleCallback || fallbackQueueingFunction; diff --git a/packages/polyfills/src/idle-callback.jest.ts b/packages/polyfills/src/idle-callback.jest.ts index 458339ff2f..16abe4e95b 100644 --- a/packages/polyfills/src/idle-callback.jest.ts +++ b/packages/polyfills/src/idle-callback.jest.ts @@ -30,8 +30,7 @@ function fallbackQueueingFunction(cb: IdleCallback) { } if (typeof window !== 'undefined') { - // @ts-ignore - const extendedWindow = window as PolyfilledWindow; + const extendedWindow = window as PolyfilledWindow & typeof globalThis; extendedWindow.requestIdleCallback = extendedWindow.requestIdleCallback || fallbackQueueingFunction; diff --git a/packages/react-form-state/src/FormState.ts b/packages/react-form-state/src/FormState.ts index 58f513a580..bc3fe82cf7 100644 --- a/packages/react-form-state/src/FormState.ts +++ b/packages/react-form-state/src/FormState.ts @@ -393,10 +393,11 @@ export default class FormState< return; } - const {validators = {}} = this.props; + const { + validators = {} as Partial>, + } = this.props; const {fields} = this.state; - // @ts-ignore return runValidator(validators[fieldPath], value, fields); } diff --git a/packages/react-graphql/src/hooks/mutation.ts b/packages/react-graphql/src/hooks/mutation.ts index 119447776f..4a45cf86af 100644 --- a/packages/react-graphql/src/hooks/mutation.ts +++ b/packages/react-graphql/src/hooks/mutation.ts @@ -59,6 +59,5 @@ export default function useMutation( ], ); - // @ts-ignore - return runMutation; + return runMutation as MutationHookResult; } diff --git a/packages/react-import-remote/src/load.ts b/packages/react-import-remote/src/load.ts index 792f145902..4737c40fe8 100644 --- a/packages/react-import-remote/src/load.ts +++ b/packages/react-import-remote/src/load.ts @@ -27,8 +27,7 @@ export default function load< function scriptTagOnLoad() { scriptTag.removeEventListener('load', scriptTagOnLoad); scriptTag.removeEventListener('error', scriptTagOnError); - // @ts-ignore - resolve(getImport(window as CustomWindow)); + resolve(getImport(window as CustomWindow & typeof globalThis)); } function scriptTagOnError() { diff --git a/packages/react-server-webpack-plugin/tsconfig.json b/packages/react-server-webpack-plugin/tsconfig.json index 01a3700833..7905bb7575 100644 --- a/packages/react-server-webpack-plugin/tsconfig.json +++ b/packages/react-server-webpack-plugin/tsconfig.json @@ -11,6 +11,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "exclude": ["**/*.test.ts", "**/*.test.tsx", "**/*/templates/**/*"], "references": [{"path": "../react-testing"}] } From ac6d607d920a5096c43fc8905607e660f1bc4569 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 20 Sep 2019 13:31:35 -0400 Subject: [PATCH 03/11] Remove some lingering ts-ignores --- packages/react-async/src/Prefetcher.tsx | 4 +--- .../src/I18nUniversalProvider.tsx | 1 - packages/react-self-serializers/src/I18n.tsx | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/react-async/src/Prefetcher.tsx b/packages/react-async/src/Prefetcher.tsx index 08f8c48d98..d4f14d8329 100644 --- a/packages/react-async/src/Prefetcher.tsx +++ b/packages/react-async/src/Prefetcher.tsx @@ -118,13 +118,11 @@ class ConnectedPrefetcher extends React.PureComponent { if ( timeout != null && urlsEqual(closestUrl, timeoutUrl) && - // @ts-ignore !urlsEqual(relatedUrl, timeoutUrl) ) { this.clearTimeout(); } - // @ts-ignore if (urlsEqual(closestUrl, url) && !urlsEqual(relatedUrl, url)) { this.setState({url: undefined}); } @@ -182,7 +180,7 @@ function shouldPrefetchAggressively() { ); } -function urlsEqual(first?: URL, second?: URL) { +function urlsEqual(first?: URL | null, second?: URL) { return ( (first == null && first === second) || (first != null && second != null && first.href === second.href) diff --git a/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx b/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx index dbab1d55cc..7954c56ed8 100644 --- a/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx +++ b/packages/react-i18n-universal-provider/src/I18nUniversalProvider.tsx @@ -25,7 +25,6 @@ export function I18nUniversalProvider({ const [serialized, Serialize] = useSerialized('i18n'); const i18nDetails: I18nDetails = { - // @ts-ignore locale: explicitI18nDetails.fallbackLocale || 'en', ...(serialized ? serialized : {}), ...explicitI18nDetails, diff --git a/packages/react-self-serializers/src/I18n.tsx b/packages/react-self-serializers/src/I18n.tsx index 510871ab55..04e1854efa 100644 --- a/packages/react-self-serializers/src/I18n.tsx +++ b/packages/react-self-serializers/src/I18n.tsx @@ -23,7 +23,6 @@ export function I18n({children, ...givenI18nDetails}: Props) { const [serialized, Serialize] = useSerialized('i18n'); const i18nDetails: I18nDetails = { - // @ts-ignore locale: givenI18nDetails.fallbackLocale || 'en', ...givenI18nDetails, ...(serialized ? serialized.i18nDetails : {}), From c23b5397c83d146fc1a6a0f4aaa78c44e37cc6fd Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 20 Sep 2019 16:45:07 -0400 Subject: [PATCH 04/11] Add ExtendedWindow to useful-types --- packages/polyfills/src/idle-callback.browser.ts | 3 ++- packages/polyfills/src/idle-callback.jest.ts | 3 ++- packages/polyfills/tsconfig.json | 3 ++- packages/react-idle/tsconfig.json | 3 ++- packages/react-import-remote/src/load.ts | 4 +++- packages/useful-types/src/types.ts | 2 ++ 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/polyfills/src/idle-callback.browser.ts b/packages/polyfills/src/idle-callback.browser.ts index 6804f1a967..4f139f5539 100644 --- a/packages/polyfills/src/idle-callback.browser.ts +++ b/packages/polyfills/src/idle-callback.browser.ts @@ -1,4 +1,5 @@ // reference: https://developers.google.com/web/updates/2015/08/using-requestidlecallback +import {ExtendedWindow} from '@shopify/useful-types'; interface IdleCallback { (params: CallbackParams): void; @@ -28,7 +29,7 @@ function fallbackQueueingFunction(cb: IdleCallback) { }); } -const extendedWindow = window as PolyfilledWindow & typeof globalThis; +const extendedWindow = window as ExtendedWindow; extendedWindow.requestIdleCallback = extendedWindow.requestIdleCallback || fallbackQueueingFunction; diff --git a/packages/polyfills/src/idle-callback.jest.ts b/packages/polyfills/src/idle-callback.jest.ts index 16abe4e95b..2688f2b15b 100644 --- a/packages/polyfills/src/idle-callback.jest.ts +++ b/packages/polyfills/src/idle-callback.jest.ts @@ -1,4 +1,5 @@ // reference: https://developers.google.com/web/updates/2015/08/using-requestidlecallback +import {ExtendedWindow} from '@shopify/useful-types'; interface IdleCallback { (params: CallbackParams): void; @@ -30,7 +31,7 @@ function fallbackQueueingFunction(cb: IdleCallback) { } if (typeof window !== 'undefined') { - const extendedWindow = window as PolyfilledWindow & typeof globalThis; + const extendedWindow = window as ExtendedWindow; extendedWindow.requestIdleCallback = extendedWindow.requestIdleCallback || fallbackQueueingFunction; diff --git a/packages/polyfills/tsconfig.json b/packages/polyfills/tsconfig.json index 5ee0343fdb..3209f9dcad 100644 --- a/packages/polyfills/tsconfig.json +++ b/packages/polyfills/tsconfig.json @@ -11,5 +11,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../useful-types"}] } diff --git a/packages/react-idle/tsconfig.json b/packages/react-idle/tsconfig.json index 5ee0343fdb..3209f9dcad 100644 --- a/packages/react-idle/tsconfig.json +++ b/packages/react-idle/tsconfig.json @@ -11,5 +11,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../useful-types"}] } diff --git a/packages/react-import-remote/src/load.ts b/packages/react-import-remote/src/load.ts index 4737c40fe8..6a1bbf49a5 100644 --- a/packages/react-import-remote/src/load.ts +++ b/packages/react-import-remote/src/load.ts @@ -1,3 +1,5 @@ +import {ExtendedWindow} from '@shopify/useful-types'; + const cache = new Map>(); export default function load< @@ -27,7 +29,7 @@ export default function load< function scriptTagOnLoad() { scriptTag.removeEventListener('load', scriptTagOnLoad); scriptTag.removeEventListener('error', scriptTagOnError); - resolve(getImport(window as CustomWindow & typeof globalThis)); + resolve(getImport(window as ExtendedWindow)); } function scriptTagOnError() { diff --git a/packages/useful-types/src/types.ts b/packages/useful-types/src/types.ts index ee1556273e..698f1db8e1 100644 --- a/packages/useful-types/src/types.ts +++ b/packages/useful-types/src/types.ts @@ -64,3 +64,5 @@ type ReactStatics = | 'getDefaultProps' | 'propTypes'; export type NonReactStatics = Pick>; + +export type ExtendedWindow = Window & typeof globalThis & T; From 0b1a407674dd8cf26388d82c1d2ca6659a56c4b4 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 20 Sep 2019 16:52:10 -0400 Subject: [PATCH 05/11] Remove script --- script.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 script.js diff --git a/script.js b/script.js deleted file mode 100644 index 093c999022..0000000000 --- a/script.js +++ /dev/null @@ -1,17 +0,0 @@ -const {resolve, basename} = require('path'); -const {renameSync} = require('fs'); -const glob = require('glob'); - -const packages = glob.sync(resolve(__dirname, 'packages/*')); -packages.forEach(path => { - console.log(`{"path": "./${basename(path)}"},`); -}); - -const tsconfigBuild = glob.sync( - resolve(__dirname, 'packages/*/tsconfig.build.json'), -); -// console.log('tsconfigBuild: ', tsconfigBuild); -// tsconfigBuild.forEach(file => { -// console.log('\n\nRenaming file: ', file); -// renameSync(file, file.replace('tsconfig.build.json', 'tsconfig.json')); -// }); From 922b0e243833bb6c39cfb04cc5c8fce32371fee8 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Thu, 26 Sep 2019 19:41:49 -0400 Subject: [PATCH 06/11] PR fixes --- packages/address-consts/tsconfig.json | 1 - packages/address-mocks/tsconfig.json | 1 - packages/address/tsconfig.json | 1 - packages/admin-graphql-api-utilities/tsconfig.json | 1 - packages/ast-utilities/tsconfig.json | 1 - packages/async/tsconfig.json | 1 - packages/csrf-token-fetcher/tsconfig.json | 1 - packages/css-utilities/tsconfig.json | 1 - packages/dates/tsconfig.json | 1 - packages/decorators/tsconfig.json | 1 - packages/enzyme-utilities/tsconfig.json | 1 - packages/function-enhancers/tsconfig.json | 1 - packages/graphql-persisted/tsconfig.json | 1 - packages/graphql-testing/tsconfig.json | 1 - packages/i18n/tsconfig.json | 1 - packages/jest-dom-mocks/tsconfig.json | 1 - packages/jest-koa-mocks/tsconfig.json | 1 - packages/jest-mock-apollo/tsconfig.json | 1 - packages/jest-mock-router/tsconfig.json | 1 - packages/koa-liveness-ping/tsconfig.json | 1 - packages/koa-metrics/tsconfig.json | 1 - packages/koa-shopify-auth/tsconfig.json | 1 - packages/koa-shopify-graphql-proxy/tsconfig.json | 1 - packages/koa-shopify-webhooks/tsconfig.json | 1 - packages/logger/tsconfig.json | 1 - packages/network/tsconfig.json | 1 - packages/performance/tsconfig.json | 1 - packages/polyfills/tsconfig.json | 1 - packages/predicates/tsconfig.json | 1 - .../react-app-bridge-universal-provider/tsconfig.json | 1 - packages/react-async/tsconfig.json | 1 - packages/react-compose/tsconfig.json | 1 - packages/react-csrf-universal-provider/tsconfig.json | 1 - packages/react-csrf/tsconfig.json | 1 - packages/react-effect-apollo/tsconfig.json | 1 - packages/react-effect/tsconfig.json | 1 - packages/react-form-state/tsconfig.json | 1 - packages/react-form/tsconfig.json | 1 - packages/react-google-analytics/tsconfig.json | 1 - .../react-graphql-universal-provider/tsconfig.json | 1 - packages/react-graphql/tsconfig.json | 1 - packages/react-hooks/tsconfig.json | 1 - packages/react-html/tsconfig.json | 1 - packages/react-hydrate/tsconfig.json | 1 - packages/react-i18n-universal-provider/tsconfig.json | 1 - packages/react-i18n/tsconfig.json | 1 - packages/react-idle/tsconfig.json | 1 - packages/react-import-remote/tsconfig.json | 1 - packages/react-intersection-observer/tsconfig.json | 1 - packages/react-network/tsconfig.json | 1 - packages/react-preconnect/tsconfig.json | 1 - packages/react-router/tsconfig.json | 1 - packages/react-self-serializers/tsconfig.json | 1 - packages/react-serialize/tsconfig.json | 1 - packages/react-server-webpack-plugin/tsconfig.json | 1 - packages/react-server/tsconfig.json | 1 - .../react-shopify-app-route-propagator/tsconfig.json | 1 - packages/react-shortcuts/tsconfig.json | 1 - packages/react-testing/tsconfig.json | 1 - packages/react-tracking-pixel/tsconfig.json | 1 - packages/react-universal-provider/tsconfig.json | 1 - packages/semaphore/tsconfig.json | 1 - packages/sewing-kit-koa/tsconfig.json | 1 - packages/tsconfig_base.json | 10 ++-------- packages/useful-types/tsconfig.json | 8 +------- packages/with-env/tsconfig.json | 9 ++------- templates/tsconfig.build.hbs.json | 1 - 67 files changed, 5 insertions(+), 86 deletions(-) diff --git a/packages/address-consts/tsconfig.json b/packages/address-consts/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/address-consts/tsconfig.json +++ b/packages/address-consts/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/address-mocks/tsconfig.json b/packages/address-mocks/tsconfig.json index dc8c479686..9f75a73f1d 100644 --- a/packages/address-mocks/tsconfig.json +++ b/packages/address-mocks/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/address/tsconfig.json b/packages/address/tsconfig.json index 897bb7fc70..b06bfc0338 100644 --- a/packages/address/tsconfig.json +++ b/packages/address/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/admin-graphql-api-utilities/tsconfig.json b/packages/admin-graphql-api-utilities/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/admin-graphql-api-utilities/tsconfig.json +++ b/packages/admin-graphql-api-utilities/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/ast-utilities/tsconfig.json b/packages/ast-utilities/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/ast-utilities/tsconfig.json +++ b/packages/ast-utilities/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/async/tsconfig.json b/packages/async/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/async/tsconfig.json +++ b/packages/async/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/csrf-token-fetcher/tsconfig.json b/packages/csrf-token-fetcher/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/csrf-token-fetcher/tsconfig.json +++ b/packages/csrf-token-fetcher/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/css-utilities/tsconfig.json b/packages/css-utilities/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/css-utilities/tsconfig.json +++ b/packages/css-utilities/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/dates/tsconfig.json b/packages/dates/tsconfig.json index 7d111b49d6..f8e273ba21 100644 --- a/packages/dates/tsconfig.json +++ b/packages/dates/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/decorators/tsconfig.json b/packages/decorators/tsconfig.json index 0a80f11756..9db6d8c4fc 100644 --- a/packages/decorators/tsconfig.json +++ b/packages/decorators/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/enzyme-utilities/tsconfig.json b/packages/enzyme-utilities/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/enzyme-utilities/tsconfig.json +++ b/packages/enzyme-utilities/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/function-enhancers/tsconfig.json b/packages/function-enhancers/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/function-enhancers/tsconfig.json +++ b/packages/function-enhancers/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/graphql-persisted/tsconfig.json b/packages/graphql-persisted/tsconfig.json index fb5345dc3e..b0f4bea814 100644 --- a/packages/graphql-persisted/tsconfig.json +++ b/packages/graphql-persisted/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/graphql-testing/tsconfig.json b/packages/graphql-testing/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/graphql-testing/tsconfig.json +++ b/packages/graphql-testing/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/i18n/tsconfig.json +++ b/packages/i18n/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/jest-dom-mocks/tsconfig.json b/packages/jest-dom-mocks/tsconfig.json index cdfa02fef9..168bbc0cb8 100644 --- a/packages/jest-dom-mocks/tsconfig.json +++ b/packages/jest-dom-mocks/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/jest-koa-mocks/tsconfig.json b/packages/jest-koa-mocks/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/jest-koa-mocks/tsconfig.json +++ b/packages/jest-koa-mocks/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/jest-mock-apollo/tsconfig.json b/packages/jest-mock-apollo/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/jest-mock-apollo/tsconfig.json +++ b/packages/jest-mock-apollo/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/jest-mock-router/tsconfig.json b/packages/jest-mock-router/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/jest-mock-router/tsconfig.json +++ b/packages/jest-mock-router/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/koa-liveness-ping/tsconfig.json b/packages/koa-liveness-ping/tsconfig.json index 301c2caf22..8ae9b5aa83 100644 --- a/packages/koa-liveness-ping/tsconfig.json +++ b/packages/koa-liveness-ping/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/koa-metrics/tsconfig.json b/packages/koa-metrics/tsconfig.json index 78a21fd98d..97a7a50002 100644 --- a/packages/koa-metrics/tsconfig.json +++ b/packages/koa-metrics/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/koa-shopify-auth/tsconfig.json b/packages/koa-shopify-auth/tsconfig.json index f9fe35eb2a..9fdca2a599 100644 --- a/packages/koa-shopify-auth/tsconfig.json +++ b/packages/koa-shopify-auth/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/koa-shopify-graphql-proxy/tsconfig.json b/packages/koa-shopify-graphql-proxy/tsconfig.json index 301c2caf22..8ae9b5aa83 100644 --- a/packages/koa-shopify-graphql-proxy/tsconfig.json +++ b/packages/koa-shopify-graphql-proxy/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/koa-shopify-webhooks/tsconfig.json b/packages/koa-shopify-webhooks/tsconfig.json index 1842f0ea07..844cb9af3c 100644 --- a/packages/koa-shopify-webhooks/tsconfig.json +++ b/packages/koa-shopify-webhooks/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/logger/tsconfig.json +++ b/packages/logger/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/network/tsconfig.json b/packages/network/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/network/tsconfig.json +++ b/packages/network/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/performance/tsconfig.json b/packages/performance/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/performance/tsconfig.json +++ b/packages/performance/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/polyfills/tsconfig.json b/packages/polyfills/tsconfig.json index 3209f9dcad..6578e36979 100644 --- a/packages/polyfills/tsconfig.json +++ b/packages/polyfills/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/predicates/tsconfig.json b/packages/predicates/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/predicates/tsconfig.json +++ b/packages/predicates/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-app-bridge-universal-provider/tsconfig.json b/packages/react-app-bridge-universal-provider/tsconfig.json index 16d4257dd3..9650dcc366 100644 --- a/packages/react-app-bridge-universal-provider/tsconfig.json +++ b/packages/react-app-bridge-universal-provider/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-async/tsconfig.json b/packages/react-async/tsconfig.json index 00ab2f08f9..bf3c7e0d10 100644 --- a/packages/react-async/tsconfig.json +++ b/packages/react-async/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-compose/tsconfig.json b/packages/react-compose/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-compose/tsconfig.json +++ b/packages/react-compose/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-csrf-universal-provider/tsconfig.json b/packages/react-csrf-universal-provider/tsconfig.json index 5df60b2a71..1372a345f7 100644 --- a/packages/react-csrf-universal-provider/tsconfig.json +++ b/packages/react-csrf-universal-provider/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-csrf/tsconfig.json b/packages/react-csrf/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-csrf/tsconfig.json +++ b/packages/react-csrf/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-effect-apollo/tsconfig.json b/packages/react-effect-apollo/tsconfig.json index 79fc225de2..61f0fbb5b7 100644 --- a/packages/react-effect-apollo/tsconfig.json +++ b/packages/react-effect-apollo/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-effect/tsconfig.json b/packages/react-effect/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-effect/tsconfig.json +++ b/packages/react-effect/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-form-state/tsconfig.json b/packages/react-form-state/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-form-state/tsconfig.json +++ b/packages/react-form-state/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-form/tsconfig.json b/packages/react-form/tsconfig.json index fe1497bd2a..d77632cee8 100644 --- a/packages/react-form/tsconfig.json +++ b/packages/react-form/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-google-analytics/tsconfig.json b/packages/react-google-analytics/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-google-analytics/tsconfig.json +++ b/packages/react-google-analytics/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-graphql-universal-provider/tsconfig.json b/packages/react-graphql-universal-provider/tsconfig.json index 2643859078..c383a352ea 100644 --- a/packages/react-graphql-universal-provider/tsconfig.json +++ b/packages/react-graphql-universal-provider/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-graphql/tsconfig.json b/packages/react-graphql/tsconfig.json index f2e3498701..a57c28d795 100644 --- a/packages/react-graphql/tsconfig.json +++ b/packages/react-graphql/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-hooks/tsconfig.json b/packages/react-hooks/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-hooks/tsconfig.json +++ b/packages/react-hooks/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-html/tsconfig.json b/packages/react-html/tsconfig.json index e2d5354b97..691519e54e 100644 --- a/packages/react-html/tsconfig.json +++ b/packages/react-html/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-hydrate/tsconfig.json b/packages/react-hydrate/tsconfig.json index df307c5e09..2dc9245e28 100644 --- a/packages/react-hydrate/tsconfig.json +++ b/packages/react-hydrate/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-i18n-universal-provider/tsconfig.json b/packages/react-i18n-universal-provider/tsconfig.json index 7fea159878..7596b72a0e 100644 --- a/packages/react-i18n-universal-provider/tsconfig.json +++ b/packages/react-i18n-universal-provider/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-i18n/tsconfig.json b/packages/react-i18n/tsconfig.json index 477720784d..aa3527a2bc 100644 --- a/packages/react-i18n/tsconfig.json +++ b/packages/react-i18n/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-idle/tsconfig.json b/packages/react-idle/tsconfig.json index 3209f9dcad..6578e36979 100644 --- a/packages/react-idle/tsconfig.json +++ b/packages/react-idle/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-import-remote/tsconfig.json b/packages/react-import-remote/tsconfig.json index 16d4257dd3..9650dcc366 100644 --- a/packages/react-import-remote/tsconfig.json +++ b/packages/react-import-remote/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-intersection-observer/tsconfig.json b/packages/react-intersection-observer/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-intersection-observer/tsconfig.json +++ b/packages/react-intersection-observer/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-network/tsconfig.json b/packages/react-network/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-network/tsconfig.json +++ b/packages/react-network/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-preconnect/tsconfig.json b/packages/react-preconnect/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-preconnect/tsconfig.json +++ b/packages/react-preconnect/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-router/tsconfig.json b/packages/react-router/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-router/tsconfig.json +++ b/packages/react-router/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-self-serializers/tsconfig.json b/packages/react-self-serializers/tsconfig.json index c4ab4cc39a..70299746e4 100644 --- a/packages/react-self-serializers/tsconfig.json +++ b/packages/react-self-serializers/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-serialize/tsconfig.json b/packages/react-serialize/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-serialize/tsconfig.json +++ b/packages/react-serialize/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-server-webpack-plugin/tsconfig.json b/packages/react-server-webpack-plugin/tsconfig.json index 7905bb7575..8a1a646f79 100644 --- a/packages/react-server-webpack-plugin/tsconfig.json +++ b/packages/react-server-webpack-plugin/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-server/tsconfig.json b/packages/react-server/tsconfig.json index a2c38cb71b..4cb9ee60a6 100644 --- a/packages/react-server/tsconfig.json +++ b/packages/react-server/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-shopify-app-route-propagator/tsconfig.json b/packages/react-shopify-app-route-propagator/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-shopify-app-route-propagator/tsconfig.json +++ b/packages/react-shopify-app-route-propagator/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-shortcuts/tsconfig.json b/packages/react-shortcuts/tsconfig.json index 5ee0343fdb..38f3f1c198 100644 --- a/packages/react-shortcuts/tsconfig.json +++ b/packages/react-shortcuts/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-testing/tsconfig.json b/packages/react-testing/tsconfig.json index 3209f9dcad..6578e36979 100644 --- a/packages/react-testing/tsconfig.json +++ b/packages/react-testing/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-tracking-pixel/tsconfig.json b/packages/react-tracking-pixel/tsconfig.json index 16d4257dd3..9650dcc366 100644 --- a/packages/react-tracking-pixel/tsconfig.json +++ b/packages/react-tracking-pixel/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/react-universal-provider/tsconfig.json b/packages/react-universal-provider/tsconfig.json index 16d4257dd3..9650dcc366 100644 --- a/packages/react-universal-provider/tsconfig.json +++ b/packages/react-universal-provider/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/semaphore/tsconfig.json b/packages/semaphore/tsconfig.json index f623229fc7..c1ac52e504 100644 --- a/packages/semaphore/tsconfig.json +++ b/packages/semaphore/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/sewing-kit-koa/tsconfig.json b/packages/sewing-kit-koa/tsconfig.json index bd406ee2c4..5712f4428b 100644 --- a/packages/sewing-kit-koa/tsconfig.json +++ b/packages/sewing-kit-koa/tsconfig.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", diff --git a/packages/tsconfig_base.json b/packages/tsconfig_base.json index d6d68cd834..2f72b727f1 100644 --- a/packages/tsconfig_base.json +++ b/packages/tsconfig_base.json @@ -1,4 +1,5 @@ { + "compileOnSave": false, "compilerOptions": { "composite": true, "declaration": true, @@ -8,7 +9,6 @@ "target": "es5", "downlevelIteration": true, "esModuleInterop": true, - "declaration": true, "jsx": "react", "strictNullChecks": true, "noImplicitAny": false, @@ -28,11 +28,5 @@ "esnext.asynciterable" ], "typeRoots": ["../node_modules/@types"] - }, -<<<<<<< HEAD:tsconfig.base.json - "include": ["./config/typescript/**/*.d.ts", "./**/*.ts", "./**/*.tsx"], - "exclude": ["./node_modules"] -======= - "include": ["../config/typescript/**/*.d.ts"] ->>>>>>> Migrate codebase to use Typescript project references & incremental builds:packages/tsconfig_base.json + } } diff --git a/packages/useful-types/tsconfig.json b/packages/useful-types/tsconfig.json index 5ee0343fdb..db6b399ba8 100644 --- a/packages/useful-types/tsconfig.json +++ b/packages/useful-types/tsconfig.json @@ -1,15 +1,9 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", "rootDir": "./src" }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "include": ["./src/**/*.ts"] } diff --git a/packages/with-env/tsconfig.json b/packages/with-env/tsconfig.json index 5ee0343fdb..cc0e93b1f3 100644 --- a/packages/with-env/tsconfig.json +++ b/packages/with-env/tsconfig.json @@ -1,15 +1,10 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", "rootDir": "./src" }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "include": ["./src/**/*.ts"], + "exclude": ["**/*.test.ts"] } diff --git a/templates/tsconfig.build.hbs.json b/templates/tsconfig.build.hbs.json index 5ee0343fdb..38f3f1c198 100644 --- a/templates/tsconfig.build.hbs.json +++ b/templates/tsconfig.build.hbs.json @@ -1,6 +1,5 @@ { "extends": "../tsconfig_base.json", - "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", From 99bfddd124fe8382f7fab207d32f4731a6fa5ca2 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 1 Nov 2019 13:43:26 -0400 Subject: [PATCH 07/11] Fix bad rebase --- .vscode/settings.json | 2 - config/typescript/globals.d.ts | 2 +- package.json | 6 +- packages/koa-metrics/tsconfig.json | 6 +- packages/koa-performance/tsconfig.json | 16 +++++ .../tsconfig.json} | 5 +- packages/react-idle/src/hooks.ts | 13 ++-- packages/react-idle/tsconfig.json | 2 +- packages/react-import-remote/src/hooks.ts | 7 ++- .../tsconfig.json} | 2 +- .../react-server-webpack-plugin/tsconfig.json | 4 +- .../{tsconfig.build.json => tsconfig.json} | 5 +- packages/statsd/tsconfig.build.json | 15 ----- .../tsconfig.json} | 2 +- packages/tsconfig.json | 8 ++- packages/web-worker/tsconfig.build.json | 15 ----- .../tsconfig.json} | 2 +- yarn.lock | 59 ++++++++++++++++++- 18 files changed, 110 insertions(+), 61 deletions(-) create mode 100644 packages/koa-performance/tsconfig.json rename packages/{react-server-webpack-plugin/tsconfig.build.json => react-cookie/tsconfig.json} (63%) rename packages/{koa-performance/tsconfig.build.json => react-performance/tsconfig.json} (87%) rename packages/react-web-worker/{tsconfig.build.json => tsconfig.json} (57%) delete mode 100644 packages/statsd/tsconfig.build.json rename packages/{react-cookie/tsconfig.build.json => statsd/tsconfig.json} (87%) delete mode 100644 packages/web-worker/tsconfig.build.json rename packages/{react-performance/tsconfig.build.json => web-worker/tsconfig.json} (87%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6fddffeae2..4ea6f05889 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,8 +24,6 @@ "**/*.js": true }, "editor.formatOnSave": true, - "prettier-stylelint.stylelintIntegration": true, - "prettier-eslint.eslintIntegration": true, "eslint.validate": ["typescript", "typescriptreact"], "javascript.implicitProjectConfig.experimentalDecorators": true, "cSpell.ignoreWords": ["transferables"] diff --git a/config/typescript/globals.d.ts b/config/typescript/globals.d.ts index 0356e2a001..e478cf195a 100644 --- a/config/typescript/globals.d.ts +++ b/config/typescript/globals.d.ts @@ -1,4 +1,4 @@ // This type duplicates TypeScript’s `Omit`, because some of our dependencies // assume TS 3.5+, which added this as a global type. Once we upgrade TypeScript, // we can safely remove this type. -type Omit = Pick>; +// type Omit = Pick>; diff --git a/package.json b/package.json index ff5399436b..e293c56a23 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@babel/core": "^7.5.5", "@shopify/app-bridge": "^0.7.3", + "@shopify/tophat": "^0.0.3", "@types/enzyme": "^3.1.10", "@types/enzyme-adapter-react-16": "^1.0.3", "@types/faker": "^4.1.5", @@ -74,12 +75,7 @@ "rimraf": "^2.6.2", "ts-jest": "^23.10.4", "tslib": "^1.9.3", -<<<<<<< HEAD - "typescript": "~3.2.1", - "@shopify/tophat": "^0.0.3" -======= "typescript": "^3.6.2" ->>>>>>> Migrate codebase to use Typescript project references & incremental builds }, "dependencies": {}, "resolutions": { diff --git a/packages/koa-metrics/tsconfig.json b/packages/koa-metrics/tsconfig.json index 97a7a50002..849bb587fd 100644 --- a/packages/koa-metrics/tsconfig.json +++ b/packages/koa-metrics/tsconfig.json @@ -11,5 +11,9 @@ "./src/**/*.tsx" ], "exclude": ["**/*.test.ts", "**/*.test.tsx"], - "references": [{"path": "../jest-koa-mocks"}, {"path": "../with-env"}] + "references": [ + {"path": "../jest-koa-mocks"}, + {"path": "../with-env"}, + {"path": "../statsd"} + ] } diff --git a/packages/koa-performance/tsconfig.json b/packages/koa-performance/tsconfig.json new file mode 100644 index 0000000000..a1f226ef36 --- /dev/null +++ b/packages/koa-performance/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../tsconfig_base.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist", + "baseUrl": "./src", + "rootDir": "./src" + }, + "include": [ + "../../config/typescript/**/*", + "./src/**/*.ts", + "./src/**/*.tsx" + ], + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../performance"}, {"path": "../statsd"}] +} diff --git a/packages/react-server-webpack-plugin/tsconfig.build.json b/packages/react-cookie/tsconfig.json similarity index 63% rename from packages/react-server-webpack-plugin/tsconfig.build.json rename to packages/react-cookie/tsconfig.json index e836cbeb4e..601258d136 100644 --- a/packages/react-server-webpack-plugin/tsconfig.build.json +++ b/packages/react-cookie/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", @@ -11,5 +11,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-network"}] } diff --git a/packages/react-idle/src/hooks.ts b/packages/react-idle/src/hooks.ts index ef4ae43dcc..90bfd49431 100644 --- a/packages/react-idle/src/hooks.ts +++ b/packages/react-idle/src/hooks.ts @@ -1,4 +1,5 @@ import {useEffect, useRef} from 'react'; +import {ExtendedWindow} from '@shopify/useful-types'; import { RequestIdleCallbackHandle, @@ -14,9 +15,9 @@ export function useIdleCallback( useEffect(() => { if ('requestIdleCallback' in window) { - handle.current = (window as WindowWithRequestIdleCallback).requestIdleCallback( - () => callback(), - ); + handle.current = (window as ExtendedWindow< + WindowWithRequestIdleCallback + >).requestIdleCallback(() => callback()); } else if (unsupportedBehavior === UnsupportedBehavior.AnimationFrame) { handle.current = window.requestAnimationFrame(() => { callback(); @@ -34,9 +35,9 @@ export function useIdleCallback( } if ('cancelIdleCallback' in window) { - (window as WindowWithRequestIdleCallback).cancelIdleCallback( - currentHandle, - ); + (window as ExtendedWindow< + WindowWithRequestIdleCallback + >).cancelIdleCallback(currentHandle); } else if (unsupportedBehavior === UnsupportedBehavior.AnimationFrame) { window.cancelAnimationFrame(currentHandle); } diff --git a/packages/react-idle/tsconfig.json b/packages/react-idle/tsconfig.json index 6578e36979..28b2f86b80 100644 --- a/packages/react-idle/tsconfig.json +++ b/packages/react-idle/tsconfig.json @@ -11,5 +11,5 @@ "./src/**/*.tsx" ], "exclude": ["**/*.test.ts", "**/*.test.tsx"], - "references": [{"path": "../useful-types"}] + "references": [{"path": "../useful-types"}, {"path": "../async"}] } diff --git a/packages/react-import-remote/src/hooks.ts b/packages/react-import-remote/src/hooks.ts index 34c81aba67..941a881025 100644 --- a/packages/react-import-remote/src/hooks.ts +++ b/packages/react-import-remote/src/hooks.ts @@ -1,4 +1,5 @@ import React from 'react'; +import {ExtendedWindow} from '@shopify/useful-types'; import {useIntersection} from '@shopify/react-intersection-observer'; import { DeferTiming, @@ -97,9 +98,9 @@ export function useImportRemote( React.useEffect(() => { if (defer === DeferTiming.Idle) { if ('requestIdleCallback' in window) { - idleCallbackHandle.current = (window as WindowWithRequestIdleCallback).requestIdleCallback( - loadRemote, - ); + idleCallbackHandle.current = (window as ExtendedWindow< + WindowWithRequestIdleCallback + >).requestIdleCallback(loadRemote); } else { loadRemote(); } diff --git a/packages/koa-performance/tsconfig.build.json b/packages/react-performance/tsconfig.json similarity index 87% rename from packages/koa-performance/tsconfig.build.json rename to packages/react-performance/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/koa-performance/tsconfig.build.json +++ b/packages/react-performance/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/react-server-webpack-plugin/tsconfig.json b/packages/react-server-webpack-plugin/tsconfig.json index 8a1a646f79..5ee0343fdb 100644 --- a/packages/react-server-webpack-plugin/tsconfig.json +++ b/packages/react-server-webpack-plugin/tsconfig.json @@ -1,5 +1,6 @@ { "extends": "../tsconfig_base.json", + "compileOnSave": false, "compilerOptions": { "outDir": "./dist", "baseUrl": "./src", @@ -10,6 +11,5 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx", "**/*/templates/**/*"], - "references": [{"path": "../react-testing"}] + "exclude": ["**/*.test.ts", "**/*.test.tsx"] } diff --git a/packages/react-web-worker/tsconfig.build.json b/packages/react-web-worker/tsconfig.json similarity index 57% rename from packages/react-web-worker/tsconfig.build.json rename to packages/react-web-worker/tsconfig.json index ebe676b5ff..37240c2970 100644 --- a/packages/react-web-worker/tsconfig.build.json +++ b/packages/react-web-worker/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", @@ -7,5 +7,6 @@ "rootDir": "./src" }, "include": ["./src/**/*.ts", "./src/**/*.tsx"], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../web-worker"}] } diff --git a/packages/statsd/tsconfig.build.json b/packages/statsd/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/statsd/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-cookie/tsconfig.build.json b/packages/statsd/tsconfig.json similarity index 87% rename from packages/react-cookie/tsconfig.build.json rename to packages/statsd/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/react-cookie/tsconfig.build.json +++ b/packages/statsd/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/tsconfig.json b/packages/tsconfig.json index bee93e4cb9..1f8c521f2d 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -23,6 +23,7 @@ {"path": "./jest-mock-router"}, {"path": "./koa-liveness-ping"}, {"path": "./koa-metrics"}, + {"path": "./koa-performance"}, {"path": "./koa-shopify-auth"}, {"path": "./koa-shopify-graphql-proxy"}, {"path": "./koa-shopify-webhooks"}, @@ -34,6 +35,7 @@ {"path": "./react-app-bridge-universal-provider"}, {"path": "./react-async"}, {"path": "./react-compose"}, + {"path": "./react-cookie"}, {"path": "./react-csrf"}, {"path": "./react-csrf-universal-provider"}, {"path": "./react-effect"}, @@ -52,6 +54,7 @@ {"path": "./react-import-remote"}, {"path": "./react-intersection-observer"}, {"path": "./react-network"}, + {"path": "./react-performance"}, {"path": "./react-preconnect"}, {"path": "./react-router"}, {"path": "./react-self-serializers"}, @@ -63,9 +66,12 @@ {"path": "./react-testing"}, {"path": "./react-tracking-pixel"}, {"path": "./react-universal-provider"}, + {"path": "./react-web-worker"}, {"path": "./semaphore"}, {"path": "./sewing-kit-koa"}, - {"path": "./useful-types"}, + {"path": "./statsd"}, + {"path": "./useful-types"} + {"path": "./web-worker"}, {"path": "./with-env"} ] } diff --git a/packages/web-worker/tsconfig.build.json b/packages/web-worker/tsconfig.build.json deleted file mode 100644 index e836cbeb4e..0000000000 --- a/packages/web-worker/tsconfig.build.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] -} diff --git a/packages/react-performance/tsconfig.build.json b/packages/web-worker/tsconfig.json similarity index 87% rename from packages/react-performance/tsconfig.build.json rename to packages/web-worker/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/react-performance/tsconfig.build.json +++ b/packages/web-worker/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/yarn.lock b/yarn.lock index 5c8977c019..643e7d5f7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1088,11 +1088,23 @@ dependencies: "@shopify/app-bridge" "^1.8.0" +"@shopify/app-bridge-react@^1.6.7": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@shopify/app-bridge-react/-/app-bridge-react-1.10.1.tgz#c965ecfa1b0349e7d53483b1e3ba5e9a6dab24d5" + integrity sha512-/PQz38xNaDzGfOhKYrbx5QxBGEmpJe3+zlbcp1zFtLzJdxtwvxRadlN4ILaZmGnM5h9meJk8YEt7Jks7Kbd8eQ== + dependencies: + "@shopify/app-bridge" "^1.10.1" + "@shopify/app-bridge@^0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/@shopify/app-bridge/-/app-bridge-0.7.3.tgz#abadfa2ef6293f630764bc5ddca31750caf00f1c" integrity sha512-xDkYvVvN8Gxy3JZduoT4Ohrl6fAuW+wEfhfL+qPzysu0LuJZ7CKgVCdEazPmtcI+V4GQPQLYLzcbCn3mWFU8dg== +"@shopify/app-bridge@^1.10.1": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@shopify/app-bridge/-/app-bridge-1.10.1.tgz#26daf94a5aa9b4c51c64ce48c72e18bcab18efef" + integrity sha512-qDyBiiZfnyaL3vEoWc7FZy5A7ouvRdR3D/Q/1VoPzMcQKNtC2yRq1h6P+674WbUav+jC11pY/qiaNlKOEaUiDg== + "@shopify/app-bridge@^1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@shopify/app-bridge/-/app-bridge-1.8.0.tgz#c11bda4d7db5310d04080e604a40a017948dd547" @@ -1108,7 +1120,26 @@ lodash "^4.17.4" lodash-decorators "^4.3.5" -"@shopify/react-html@^8.0.10": +"@shopify/react-graphql@^5.1.3": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@shopify/react-graphql/-/react-graphql-5.2.5.tgz#3c18f00a9a9f99c7ef462aff626f7b78c3117970" + integrity sha512-KuOftm/uyhK5dEPdnITRSKiaqo9fxU9e3h7M/Trdyydo7tj3+f1N5xEbIBCeZN4n+ZwyGue2BQcwuavzDmiWqA== + dependencies: + "@shopify/async" "^2.0.9" + "@shopify/react-async" "^3.0.13" + "@shopify/react-effect" "^3.2.5" + "@shopify/react-hooks" "^1.3.0" + "@shopify/react-idle" "^1.0.10" + "@shopify/react-network" "^3.3.4" + "@shopify/useful-types" "^2.0.2" + apollo-cache-inmemory ">=1.0.0 <2.0.0" + apollo-client ">=2.0.0 <3.0.0" + apollo-link ">=1.0.0 <2.0.0" + apollo-link-http ">=1.0.0 <2.0.0" + graphql-typed "^0.4.0" + react-apollo ">=2.2.3 <4.0.0" + +"@shopify/react-html@^8.0.10", "@shopify/react-html@^8.1.3": version "8.1.3" resolved "https://registry.yarnpkg.com/@shopify/react-html/-/react-html-8.1.3.tgz#1cf83190ae7e3a5cb25be5ed2ed73adf36ac0a66" integrity sha512-uExIf1n1BnPNJm04zYRnFQAmFCjW+sOGJ0agkhGAJAN59pyHSEqknuYj4CbzXZbBb1SRS/VO/XWmRdEu697fFA== @@ -1118,6 +1149,25 @@ "@shopify/useful-types" "^1.3.0" tslib "^1.9.3" +"@shopify/react-i18n@^1.8.2": + version "1.10.0" + resolved "https://registry.yarnpkg.com/@shopify/react-i18n/-/react-i18n-1.10.0.tgz#b64232169b4969cf0aa159f201ff7fe56c6ad306" + integrity sha512-KQRkMAXmjnG026YZXYDMsrTxMXj7E8IXSAXyyNuEx6Y1/zHDpyid/ceDneEhF2PMDyVcg6Iprv1lPnvKJN30nQ== + dependencies: + "@shopify/dates" "^0.2.0" + "@shopify/decorators" "^1.1.5" + "@shopify/function-enhancers" "^1.0.5" + "@shopify/i18n" "^0.1.6" + "@shopify/react-effect" "^3.2.3" + "@shopify/react-hooks" "^1.2.3" + "@shopify/useful-types" "^2.0.1" + "@types/hoist-non-react-statics" "^3.0.1" + glob "^7.1.4" + hoist-non-react-statics "^3.0.1" + prop-types "^15.6.2" + string-hash "^1.1.3" + tslib "^1.9.3" + "@shopify/react-import-remote@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@shopify/react-import-remote/-/react-import-remote-0.7.0.tgz#148e322c95b9224afa66c10d9d84f0e8c21860d6" @@ -1296,6 +1346,11 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" +"@types/faker@4.1.5": + version "4.1.5" + resolved "https://registry.yarnpkg.com/@types/faker/-/faker-4.1.5.tgz#8f620f9c9a67150aa0a32b4e8a407da43fca61d4" + integrity sha512-YSDqoBEWYGdNk53xSkkb6REaUaVSlIjxIAGjj/nbLzlZOit7kUU+nA2zC2qQkIVO4MQ+3zl4Sz7aw+kbpHHHUQ== + "@types/faker@^4.1.5": version "4.1.6" resolved "https://registry.yarnpkg.com/@types/faker/-/faker-4.1.6.tgz#e931064b1d50333044c28668c13033334cf67c71" @@ -8926,7 +8981,7 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -"react-apollo@>=3.0.0 <4.0.0", react-apollo@^3.1.2: +"react-apollo@>=2.2.3 <4.0.0", "react-apollo@>=3.0.0 <4.0.0", react-apollo@^3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/react-apollo/-/react-apollo-3.1.3.tgz#5d8540b401bba36173b63e6c5e75fa561960c63e" integrity sha512-orCZNoAkgveaK5b75y7fw1MSqSHOU/Wuu9rRFOGmRQBSQVZjvV4DI+hj604rHmuN9+WDABxb5W48wTa0F/xNZQ== From 7ff62fee9303e1d64c866be85f26fd79cceef57d Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 1 Nov 2019 17:01:59 -0400 Subject: [PATCH 08/11] Cleanup & lint fixes --- .eslintrc.js | 6 +++++- .vscode/settings.json | 2 ++ package.json | 1 - packages/graphql-persisted/src/apollo.ts | 8 +++++++- packages/jest-mock-apollo/src/MockApolloLink.ts | 1 - packages/polyfills/package.json | 1 + packages/react-idle/package.json | 3 ++- packages/react-import-remote/package.json | 1 + packages/react-self-serializers/src/I18n.tsx | 1 - packages/rpc/package.json | 2 +- packages/rpc/src/adaptors/message-port.ts | 3 ++- packages/rpc/src/strategies/channel.ts | 7 +++++-- packages/rpc/{tsconfig.build.json => tsconfig.json} | 2 +- packages/tsconfig.json | 3 ++- packages/web-worker/src/messenger/iframe.ts | 2 +- packages/web-worker/tsconfig.json | 3 ++- test/tsconfig.eslint.json | 7 +++++++ yarn.lock | 2 +- 18 files changed, 40 insertions(+), 15 deletions(-) rename packages/rpc/{tsconfig.build.json => tsconfig.json} (87%) create mode 100644 test/tsconfig.eslint.json diff --git a/.eslintrc.js b/.eslintrc.js index 525d293e49..8d25986257 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,11 @@ module.exports = { 'plugin:shopify/prettier', ], parserOptions: { - project: 'tsconfig.json', + project: [ + 'packages/tsconfig.json', + 'packages/tsconfig_base.json', + 'test/tsconfig.eslint.json', + ], }, rules: { 'jest/valid-expect-in-promise': 'off', diff --git a/.vscode/settings.json b/.vscode/settings.json index 4ea6f05889..6fddffeae2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,6 +24,8 @@ "**/*.js": true }, "editor.formatOnSave": true, + "prettier-stylelint.stylelintIntegration": true, + "prettier-eslint.eslintIntegration": true, "eslint.validate": ["typescript", "typescriptreact"], "javascript.implicitProjectConfig.experimentalDecorators": true, "cSpell.ignoreWords": ["transferables"] diff --git a/package.json b/package.json index e293c56a23..af36c8fd41 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "Shopify's javascript application utilities", "scripts": { "publish": "lerna publish", - "prebuild": "yarn run clean", "build": "yarn tsc --build packages", "lint": "eslint '**/*.{ts,tsx}'", "ci:lint-docs": "yarn generate docs && test -z \"$(git status --porcelain)\" || echo 'The root README has not been updated. Run `yarn generate docs` in the root of your quilt directory and try again.'", diff --git a/packages/graphql-persisted/src/apollo.ts b/packages/graphql-persisted/src/apollo.ts index dce01d05c9..c67a48489d 100644 --- a/packages/graphql-persisted/src/apollo.ts +++ b/packages/graphql-persisted/src/apollo.ts @@ -1,4 +1,10 @@ -import {ApolloLink, Operation, NextLink, Observable} from 'apollo-link'; +import { + ApolloLink, + Operation, + NextLink, + Observable, + FetchResult, +} from 'apollo-link'; import {CacheMissBehavior} from './shared'; diff --git a/packages/jest-mock-apollo/src/MockApolloLink.ts b/packages/jest-mock-apollo/src/MockApolloLink.ts index b39bbad3cd..40c19e5047 100644 --- a/packages/jest-mock-apollo/src/MockApolloLink.ts +++ b/packages/jest-mock-apollo/src/MockApolloLink.ts @@ -1,5 +1,4 @@ import {ApolloLink, Observable, Operation, NextLink} from 'apollo-link'; - import { GraphQLType, ExecutionResult, diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index acd4f2afaa..22556c7c0c 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -21,6 +21,7 @@ "homepage": "https://github.com/Shopify/quilt/blob/master/packages/polyfills/README.md", "dependencies": { "@babel/polyfill": "^7.0.0", + "@shopify/useful-types": "^2.1.0", "browser-unhandled-rejection": "^1.0.2", "caniuse-api": "^3.0.0", "formdata-polyfill": "^3.0.18", diff --git a/packages/react-idle/package.json b/packages/react-idle/package.json index 49c8947ab2..985da7e2be 100644 --- a/packages/react-idle/package.json +++ b/packages/react-idle/package.json @@ -20,7 +20,8 @@ }, "homepage": "https://github.com/Shopify/quilt/blob/master/packages/react-idle/README.md", "dependencies": { - "@shopify/async": "^2.1.0" + "@shopify/async": "^2.1.0", + "@shopify/useful-types": "^2.1.0" }, "peerDependencies": { "react": "^16.8.0" diff --git a/packages/react-import-remote/package.json b/packages/react-import-remote/package.json index d661ec2bd9..475c4c4ad3 100644 --- a/packages/react-import-remote/package.json +++ b/packages/react-import-remote/package.json @@ -23,6 +23,7 @@ "@shopify/react-hooks": "^1.3.0", "@shopify/react-html": "^9.2.8", "@shopify/react-intersection-observer": "^2.0.9", + "@shopify/useful-types": "^2.1.0", "tslib": "^1.9.3" }, "peerDependencies": { diff --git a/packages/react-self-serializers/src/I18n.tsx b/packages/react-self-serializers/src/I18n.tsx index 04e1854efa..3bf98323dc 100644 --- a/packages/react-self-serializers/src/I18n.tsx +++ b/packages/react-self-serializers/src/I18n.tsx @@ -1,5 +1,4 @@ import React, {useRef} from 'react'; - import {useSerialized, useHtmlAttributes} from '@shopify/react-html'; import {I18nContext, I18nDetails, I18nManager} from '@shopify/react-i18n'; diff --git a/packages/rpc/package.json b/packages/rpc/package.json index b46ccf0f2f..87a4bcbb2c 100644 --- a/packages/rpc/package.json +++ b/packages/rpc/package.json @@ -7,7 +7,7 @@ "types": "dist/index.d.ts", "sideEffects": false, "scripts": { - "build": "tsc --p tsconfig.build.json", + "build": "tsc --p tsconfig.json", "prepublishOnly": "yarn run build" }, "publishConfig": { diff --git a/packages/rpc/src/adaptors/message-port.ts b/packages/rpc/src/adaptors/message-port.ts index ac13d7f6c3..4d254c81fe 100644 --- a/packages/rpc/src/adaptors/message-port.ts +++ b/packages/rpc/src/adaptors/message-port.ts @@ -2,7 +2,8 @@ import {MessageEndpoint} from '../types'; export function fromMessagePort(messagePort: MessagePort): MessageEndpoint { return { - postMessage: (...args) => messagePort.postMessage(...args), + postMessage: (...args: [any, Transferable[]]) => + messagePort.postMessage(...args), addEventListener: (...args) => messagePort.addEventListener(...args), removeEventListener: (...args) => messagePort.removeEventListener(...args), terminate() { diff --git a/packages/rpc/src/strategies/channel.ts b/packages/rpc/src/strategies/channel.ts index 22dda772b1..db3259c8cf 100644 --- a/packages/rpc/src/strategies/channel.ts +++ b/packages/rpc/src/strategies/channel.ts @@ -64,7 +64,7 @@ export function createChannelFunctionStrategy({ const [serializedResult, transferables] = toWire(result); port1.postMessage( [RESULT, id, undefined, serializedResult], - transferables, + transferables as Transferable[], ); } catch (error) { const {name, message, stack} = error; @@ -182,7 +182,10 @@ export function createChannelFunctionStrategy({ }); const [serializedArgs, transferables] = toWire(args); - port.postMessage([APPLY, id, serializedArgs], transferables); + port.postMessage( + [APPLY, id, serializedArgs], + transferables as Transferable[], + ); return done; }, diff --git a/packages/rpc/tsconfig.build.json b/packages/rpc/tsconfig.json similarity index 87% rename from packages/rpc/tsconfig.build.json rename to packages/rpc/tsconfig.json index e836cbeb4e..5ee0343fdb 100644 --- a/packages/rpc/tsconfig.build.json +++ b/packages/rpc/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../tsconfig_base.json", "compileOnSave": false, "compilerOptions": { "outDir": "./dist", diff --git a/packages/tsconfig.json b/packages/tsconfig.json index 1f8c521f2d..efd56fa79f 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -67,10 +67,11 @@ {"path": "./react-tracking-pixel"}, {"path": "./react-universal-provider"}, {"path": "./react-web-worker"}, + {"path": "./rpc"}, {"path": "./semaphore"}, {"path": "./sewing-kit-koa"}, {"path": "./statsd"}, - {"path": "./useful-types"} + {"path": "./useful-types"}, {"path": "./web-worker"}, {"path": "./with-env"} ] diff --git a/packages/web-worker/src/messenger/iframe.ts b/packages/web-worker/src/messenger/iframe.ts index 58e37ac60c..26a2ad366e 100644 --- a/packages/web-worker/src/messenger/iframe.ts +++ b/packages/web-worker/src/messenger/iframe.ts @@ -35,7 +35,7 @@ export function createIframeWorkerMessenger(url: URL): MessageEndpoint { document.body.appendChild(iframe); return { - postMessage: (...args) => port1.postMessage(...args), + postMessage: (...args: [any, Transferable[]]) => port1.postMessage(...args), addEventListener: (...args) => port1.addEventListener(...args), removeEventListener: (...args) => port1.removeEventListener(...args), terminate() { diff --git a/packages/web-worker/tsconfig.json b/packages/web-worker/tsconfig.json index 5ee0343fdb..7ce070f3c1 100644 --- a/packages/web-worker/tsconfig.json +++ b/packages/web-worker/tsconfig.json @@ -11,5 +11,6 @@ "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../rpc"}] } diff --git a/test/tsconfig.eslint.json b/test/tsconfig.eslint.json new file mode 100644 index 0000000000..4fca01f5d9 --- /dev/null +++ b/test/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + "extends": "../packages/tsconfig_base.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["./**/*.ts"] +} diff --git a/yarn.lock b/yarn.lock index 643e7d5f7d..ac0270bc2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1561,7 +1561,7 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@^16.0.11", "@types/react-dom@^16.8.3": +"@types/react-dom@16.8.3", "@types/react-dom@^16.0.11", "@types/react-dom@^16.8.3": version "16.8.3" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.8.3.tgz#6131b7b6158bc7ed1925a3374b88b7c00481f0cb" integrity sha512-HF5hD5YR3z9Mn6kXcW1VKe4AQ04ZlZj1EdLBae61hzQ3eEWWxMgNLUbIxeZp40BnSxqY1eAYLsH9QopQcxzScA== From ae0a46b0a0b42b23257a3d1d12b83d791a6481e9 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Wed, 13 Nov 2019 17:22:03 -0500 Subject: [PATCH 09/11] PR fixes --- config/typescript/globals.d.ts | 4 -- package.json | 2 +- packages/address-consts/package.json | 7 ++- packages/address-consts/tsconfig.json | 4 +- packages/address-mocks/package.json | 7 ++- packages/address-mocks/tsconfig.json | 4 +- packages/address/package.json | 7 ++- packages/address/tsconfig.json | 4 +- .../admin-graphql-api-utilities/package.json | 7 ++- .../admin-graphql-api-utilities/tsconfig.json | 4 +- packages/ast-utilities/javascript.d.ts | 2 +- packages/ast-utilities/javascript.js | 2 +- packages/ast-utilities/markdown.d.ts | 2 +- packages/ast-utilities/markdown.js | 2 +- packages/ast-utilities/package.json | 7 ++- packages/ast-utilities/tsconfig.json | 4 +- packages/async/babel.d.ts | 4 +- packages/async/babel.js | 2 +- packages/async/package.json | 7 ++- packages/async/tsconfig.json | 4 +- packages/csrf-token-fetcher/package.json | 7 ++- packages/csrf-token-fetcher/tsconfig.json | 4 +- packages/css-utilities/package.json | 7 ++- packages/css-utilities/tsconfig.json | 4 +- packages/dates/package.json | 7 ++- packages/dates/tsconfig.json | 4 +- packages/decorators/package.json | 7 ++- packages/decorators/tsconfig.json | 4 +- packages/enzyme-utilities/package.json | 7 ++- packages/enzyme-utilities/tsconfig.json | 4 +- packages/function-enhancers/package.json | 7 ++- packages/function-enhancers/tsconfig.json | 4 +- packages/graphql-persisted/apollo.d.ts | 2 +- packages/graphql-persisted/apollo.js | 2 +- packages/graphql-persisted/koa.d.ts | 2 +- packages/graphql-persisted/koa.js | 2 +- packages/graphql-persisted/package.json | 3 + packages/graphql-persisted/tsconfig.json | 7 ++- packages/graphql-testing/matchers.d.ts | 2 +- packages/graphql-testing/matchers.js | 2 +- packages/graphql-testing/package.json | 7 ++- packages/graphql-testing/tsconfig.json | 4 +- packages/i18n/package.json | 7 ++- packages/i18n/tsconfig.json | 4 +- packages/jest-dom-mocks/package.json | 7 ++- packages/jest-dom-mocks/tsconfig.json | 4 +- packages/jest-koa-mocks/package.json | 7 ++- packages/jest-koa-mocks/tsconfig.json | 4 +- packages/jest-mock-apollo/package.json | 7 ++- packages/jest-mock-apollo/tsconfig.json | 4 +- packages/jest-mock-router/package.json | 7 ++- packages/jest-mock-router/tsconfig.json | 4 +- packages/koa-liveness-ping/package.json | 7 ++- packages/koa-liveness-ping/tsconfig.json | 4 +- packages/koa-metrics/package.json | 7 ++- packages/koa-metrics/tsconfig.json | 4 +- packages/koa-performance/package.json | 9 ++- packages/koa-performance/tsconfig.json | 4 +- packages/koa-shopify-auth/package.json | 7 ++- packages/koa-shopify-auth/tsconfig.json | 4 +- .../koa-shopify-graphql-proxy/package.json | 7 ++- .../koa-shopify-graphql-proxy/tsconfig.json | 4 +- packages/koa-shopify-webhooks/package.json | 7 ++- packages/koa-shopify-webhooks/tsconfig.json | 4 +- packages/logger/package.json | 7 ++- packages/logger/tsconfig.json | 4 +- packages/network/package.json | 7 ++- packages/network/tsconfig.json | 4 +- packages/performance/package.json | 7 ++- packages/performance/tsconfig.json | 4 +- packages/polyfills/package.json | 4 +- packages/polyfills/tsconfig.json | 4 +- packages/predicates/package.json | 7 ++- packages/predicates/tsconfig.json | 4 +- .../package.json | 7 ++- .../tsconfig.json | 4 +- packages/react-async/package.json | 7 ++- packages/react-async/testing.d.ts | 2 +- packages/react-async/testing.js | 2 +- packages/react-async/tsconfig.json | 4 +- packages/react-compose/package.json | 7 ++- packages/react-compose/tsconfig.json | 4 +- packages/react-cookie/package.json | 9 ++- packages/react-cookie/tsconfig.json | 4 +- .../package.json | 7 ++- .../tsconfig.json | 4 +- packages/react-csrf/package.json | 7 ++- packages/react-csrf/tsconfig.json | 4 +- packages/react-effect-apollo/package.json | 7 ++- packages/react-effect-apollo/tsconfig.json | 4 +- packages/react-effect/package.json | 7 ++- packages/react-effect/server.d.ts | 2 +- packages/react-effect/server.js | 2 +- packages/react-effect/tsconfig.json | 4 +- packages/react-form-state/package.json | 7 ++- packages/react-form-state/tsconfig.json | 4 +- packages/react-form/package.json | 7 ++- packages/react-form/tsconfig.json | 4 +- packages/react-google-analytics/package.json | 7 ++- packages/react-google-analytics/tsconfig.json | 4 +- .../package.json | 7 ++- .../tsconfig.json | 4 +- packages/react-graphql/package.json | 7 ++- packages/react-graphql/tsconfig.json | 4 +- packages/react-hooks/package.json | 7 ++- packages/react-hooks/tsconfig.json | 4 +- packages/react-html/package.json | 7 ++- packages/react-html/server.d.ts | 2 +- packages/react-html/server.js | 2 +- packages/react-html/tsconfig.json | 4 +- packages/react-hydrate/package.json | 7 ++- packages/react-hydrate/tsconfig.json | 4 +- .../package.json | 7 ++- .../tsconfig.json | 4 +- packages/react-i18n/babel.d.ts | 4 +- packages/react-i18n/babel.js | 2 +- packages/react-i18n/package.json | 7 ++- packages/react-i18n/tsconfig.json | 4 +- packages/react-idle/package.json | 7 ++- packages/react-idle/tsconfig.json | 4 +- packages/react-import-remote/package.json | 7 ++- packages/react-import-remote/tsconfig.json | 4 +- .../react-intersection-observer/package.json | 7 ++- .../react-intersection-observer/tsconfig.json | 4 +- packages/react-network/package.json | 7 ++- packages/react-network/server.d.ts | 2 +- packages/react-network/server.js | 2 +- packages/react-network/tsconfig.json | 4 +- packages/react-performance/package.json | 12 ++-- packages/react-performance/tsconfig.json | 4 +- packages/react-preconnect/tsconfig.json | 4 +- packages/react-router/package.json | 7 ++- packages/react-router/tsconfig.json | 4 +- packages/react-self-serializers/package.json | 49 --------------- packages/react-self-serializers/src/I18n.tsx | 60 ------------------- packages/react-self-serializers/tsconfig.json | 19 ------ packages/react-serialize/package.json | 7 ++- packages/react-serialize/tsconfig.json | 4 +- .../react-server-webpack-plugin/package.json | 7 ++- .../react-server-webpack-plugin/tsconfig.json | 7 ++- packages/react-server/package.json | 7 ++- packages/react-server/tsconfig.json | 19 +++++- .../package.json | 7 ++- .../tsconfig.json | 4 +- packages/react-shortcuts/package.json | 7 ++- packages/react-shortcuts/tsconfig.json | 4 +- packages/react-testing/matchers.d.ts | 2 +- packages/react-testing/matchers.js | 2 +- packages/react-testing/package.json | 7 ++- packages/react-testing/tsconfig.json | 4 +- packages/react-tracking-pixel/package.json | 7 ++- packages/react-tracking-pixel/tsconfig.json | 4 +- .../react-universal-provider/package.json | 7 ++- .../react-universal-provider/tsconfig.json | 4 +- packages/react-web-worker/package.json | 9 ++- packages/react-web-worker/tsconfig.json | 4 +- packages/rpc/package.json | 9 ++- packages/rpc/tsconfig.json | 4 +- packages/semaphore/package.json | 7 ++- packages/semaphore/tsconfig.json | 4 +- packages/sewing-kit-koa/package.json | 7 ++- packages/sewing-kit-koa/tsconfig.json | 4 +- packages/statsd/package.json | 9 ++- packages/statsd/tsconfig.json | 4 +- packages/tsconfig.json | 1 - packages/useful-types/package.json | 7 ++- packages/useful-types/tsconfig.json | 4 +- packages/web-worker/babel.d.ts | 4 +- packages/web-worker/babel.js | 2 +- packages/web-worker/package.json | 9 ++- packages/web-worker/tsconfig.json | 7 ++- packages/web-worker/webpack.d.ts | 4 +- packages/web-worker/webpack.js | 2 +- packages/web-worker/worker.d.ts | 4 +- packages/web-worker/worker.js | 2 +- packages/with-env/package.json | 7 ++- packages/with-env/tsconfig.json | 4 +- templates/package.hbs.json | 7 ++- ...onfig.build.hbs.json => tsconfig.hbs.json} | 4 +- yarn.lock | 5 -- 180 files changed, 546 insertions(+), 483 deletions(-) delete mode 100644 config/typescript/globals.d.ts delete mode 100644 packages/react-self-serializers/package.json delete mode 100644 packages/react-self-serializers/src/I18n.tsx delete mode 100644 packages/react-self-serializers/tsconfig.json rename templates/{tsconfig.build.hbs.json => tsconfig.hbs.json} (83%) diff --git a/config/typescript/globals.d.ts b/config/typescript/globals.d.ts deleted file mode 100644 index e478cf195a..0000000000 --- a/config/typescript/globals.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This type duplicates TypeScript’s `Omit`, because some of our dependencies -// assume TS 3.5+, which added this as a global type. Once we upgrade TypeScript, -// we can safely remove this type. -// type Omit = Pick>; diff --git a/package.json b/package.json index af36c8fd41..1b2b482e15 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test": "NODE_ICU_DATA=node_modules/full-icu jest --maxWorkers=3 --coverage=false", "check": "lerna run check", "release": "lerna publish", - "clean": "rimraf './packages/*/dist/**/*.{js,d.ts}' './packages/*/*.tsbuildinfo' './packages/*.tsbuildinfo'", + "clean": "rimraf './packages/*/dist'", "generate": "plop", "generate:package": "plop package && yarn plop docs", "tophat": "tophat" diff --git a/packages/address-consts/package.json b/packages/address-consts/package.json index ecff22794c..ec6ff0ea1c 100644 --- a/packages/address-consts/package.json +++ b/packages/address-consts/package.json @@ -3,8 +3,11 @@ "version": "1.0.1", "license": "MIT", "description": "Constants and types relating to @shopify/address", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/address-consts/tsconfig.json b/packages/address-consts/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/address-consts/tsconfig.json +++ b/packages/address-consts/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/address-mocks/package.json b/packages/address-mocks/package.json index 6b8f4ff7f0..f5d9825b78 100644 --- a/packages/address-mocks/package.json +++ b/packages/address-mocks/package.json @@ -3,8 +3,11 @@ "version": "1.2.31", "license": "MIT", "description": "Address mocks for @shopify/address library.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/address-mocks/tsconfig.json b/packages/address-mocks/tsconfig.json index 9f75a73f1d..ba5d567ab5 100644 --- a/packages/address-mocks/tsconfig.json +++ b/packages/address-mocks/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/address/package.json b/packages/address/package.json index 044de56982..d7cec1eec3 100644 --- a/packages/address/package.json +++ b/packages/address/package.json @@ -3,8 +3,11 @@ "version": "2.7.13", "license": "MIT", "description": "Address utilities for formatting addresses.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/address/tsconfig.json b/packages/address/tsconfig.json index b06bfc0338..e7dcaccdd8 100644 --- a/packages/address/tsconfig.json +++ b/packages/address/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/admin-graphql-api-utilities/package.json b/packages/admin-graphql-api-utilities/package.json index 2895ba9301..913f6436e4 100644 --- a/packages/admin-graphql-api-utilities/package.json +++ b/packages/admin-graphql-api-utilities/package.json @@ -3,8 +3,11 @@ "version": "0.0.8", "license": "MIT", "description": "A set of utilities to use when consuming Shopify’s admin graphql api.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/admin-graphql-api-utilities/tsconfig.json b/packages/admin-graphql-api-utilities/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/admin-graphql-api-utilities/tsconfig.json +++ b/packages/admin-graphql-api-utilities/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/ast-utilities/javascript.d.ts b/packages/ast-utilities/javascript.d.ts index 664e613cae..7ee14eb43f 100644 --- a/packages/ast-utilities/javascript.d.ts +++ b/packages/ast-utilities/javascript.d.ts @@ -1 +1 @@ -export * from './dist/javascript'; +export * from './dist/src/javascript'; diff --git a/packages/ast-utilities/javascript.js b/packages/ast-utilities/javascript.js index b54b21d4e9..60bcbaeaaf 100644 --- a/packages/ast-utilities/javascript.js +++ b/packages/ast-utilities/javascript.js @@ -1 +1 @@ -module.exports = require('./dist/javascript'); +module.exports = require('./dist/src/javascript'); diff --git a/packages/ast-utilities/markdown.d.ts b/packages/ast-utilities/markdown.d.ts index e79056b573..1bb0183836 100644 --- a/packages/ast-utilities/markdown.d.ts +++ b/packages/ast-utilities/markdown.d.ts @@ -1 +1 @@ -export * from './dist/markdown'; +export * from './dist/src/markdown'; diff --git a/packages/ast-utilities/markdown.js b/packages/ast-utilities/markdown.js index 004aa10488..4f3c5846f3 100644 --- a/packages/ast-utilities/markdown.js +++ b/packages/ast-utilities/markdown.js @@ -1 +1 @@ -module.exports = require('./dist/markdown'); +module.exports = require('./dist/src/markdown'); diff --git a/packages/ast-utilities/package.json b/packages/ast-utilities/package.json index ec6997fe04..fce20bad28 100644 --- a/packages/ast-utilities/package.json +++ b/packages/ast-utilities/package.json @@ -3,8 +3,11 @@ "version": "0.0.7", "license": "MIT", "description": "Utilities for working with Abstract Syntax Trees (ASTs)", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/ast-utilities/tsconfig.json b/packages/ast-utilities/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/ast-utilities/tsconfig.json +++ b/packages/ast-utilities/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/async/babel.d.ts b/packages/async/babel.d.ts index f7a5261b74..89396c95af 100644 --- a/packages/async/babel.d.ts +++ b/packages/async/babel.d.ts @@ -1,2 +1,2 @@ -export {default} from './dist/babel-plugin'; -export * from './dist/babel-plugin'; +export {default} from './dist/src/babel-plugin'; +export * from './dist/src/babel-plugin'; diff --git a/packages/async/babel.js b/packages/async/babel.js index ecb6e1f242..e65b208720 100644 --- a/packages/async/babel.js +++ b/packages/async/babel.js @@ -1 +1 @@ -module.exports = require('./dist/babel-plugin'); +module.exports = require('./dist/src/babel-plugin'); diff --git a/packages/async/package.json b/packages/async/package.json index 9674c05dfa..86e39a1cf1 100644 --- a/packages/async/package.json +++ b/packages/async/package.json @@ -3,8 +3,11 @@ "version": "2.1.0", "license": "MIT", "description": "Primitives for loading parts of an application asynchronously.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/async/tsconfig.json b/packages/async/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/async/tsconfig.json +++ b/packages/async/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/csrf-token-fetcher/package.json b/packages/csrf-token-fetcher/package.json index 7a50fea3df..b33e3aa965 100644 --- a/packages/csrf-token-fetcher/package.json +++ b/packages/csrf-token-fetcher/package.json @@ -3,8 +3,11 @@ "version": "0.0.7", "license": "MIT", "description": "JavaScript utility function to fetch the CSRF token required to make requests to a Rails server", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/csrf-token-fetcher/tsconfig.json b/packages/csrf-token-fetcher/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/csrf-token-fetcher/tsconfig.json +++ b/packages/csrf-token-fetcher/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/css-utilities/package.json b/packages/css-utilities/package.json index 7af40cf220..8188d7c4ea 100644 --- a/packages/css-utilities/package.json +++ b/packages/css-utilities/package.json @@ -3,8 +3,11 @@ "version": "1.0.1", "license": "MIT", "description": "A set of css styling related utilities.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/css-utilities/tsconfig.json b/packages/css-utilities/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/css-utilities/tsconfig.json +++ b/packages/css-utilities/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/dates/package.json b/packages/dates/package.json index 36fc6d5fa4..a3242fdbf1 100644 --- a/packages/dates/package.json +++ b/packages/dates/package.json @@ -3,8 +3,11 @@ "version": "0.2.7", "license": "MIT", "description": "Lightweight date operations library.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/dates/tsconfig.json b/packages/dates/tsconfig.json index f8e273ba21..84c504e0e6 100644 --- a/packages/dates/tsconfig.json +++ b/packages/dates/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/decorators/package.json b/packages/decorators/package.json index ca66356b08..0ad54a473b 100644 --- a/packages/decorators/package.json +++ b/packages/decorators/package.json @@ -3,8 +3,11 @@ "version": "1.1.5", "license": "MIT", "description": "A set of decorators to aid your JavaScript journey.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/decorators/tsconfig.json b/packages/decorators/tsconfig.json index 9db6d8c4fc..6d49883dfa 100644 --- a/packages/decorators/tsconfig.json +++ b/packages/decorators/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/enzyme-utilities/package.json b/packages/enzyme-utilities/package.json index 08983ce7b0..23abc4d111 100644 --- a/packages/enzyme-utilities/package.json +++ b/packages/enzyme-utilities/package.json @@ -3,8 +3,11 @@ "version": "2.1.5", "license": "MIT", "description": "Enzyme utilities for testing React components.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/enzyme-utilities/tsconfig.json b/packages/enzyme-utilities/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/enzyme-utilities/tsconfig.json +++ b/packages/enzyme-utilities/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/function-enhancers/package.json b/packages/function-enhancers/package.json index 580e74c720..17db23a80e 100644 --- a/packages/function-enhancers/package.json +++ b/packages/function-enhancers/package.json @@ -3,8 +3,11 @@ "version": "1.0.5", "license": "MIT", "description": "A set of helpers to enhance functions.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/function-enhancers/tsconfig.json b/packages/function-enhancers/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/function-enhancers/tsconfig.json +++ b/packages/function-enhancers/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/graphql-persisted/apollo.d.ts b/packages/graphql-persisted/apollo.d.ts index aa08d3ea29..1fbe94ef57 100644 --- a/packages/graphql-persisted/apollo.d.ts +++ b/packages/graphql-persisted/apollo.d.ts @@ -1 +1 @@ -export * from './dist/apollo'; +export * from './dist/src/apollo'; diff --git a/packages/graphql-persisted/apollo.js b/packages/graphql-persisted/apollo.js index 5ae280ee63..ac8fd657da 100644 --- a/packages/graphql-persisted/apollo.js +++ b/packages/graphql-persisted/apollo.js @@ -1 +1 @@ -module.exports = require('./dist/apollo'); +module.exports = require('./dist/src/apollo'); diff --git a/packages/graphql-persisted/koa.d.ts b/packages/graphql-persisted/koa.d.ts index f468ab7ece..5b59838b5a 100644 --- a/packages/graphql-persisted/koa.d.ts +++ b/packages/graphql-persisted/koa.d.ts @@ -1 +1 @@ -export * from './dist/koa-middleware'; +export * from './dist/src/koa-middleware'; diff --git a/packages/graphql-persisted/koa.js b/packages/graphql-persisted/koa.js index c411145c5d..6b43658dad 100644 --- a/packages/graphql-persisted/koa.js +++ b/packages/graphql-persisted/koa.js @@ -1 +1 @@ -module.exports = require('./dist/koa-middleware'); +module.exports = require('./dist/src/koa-middleware'); diff --git a/packages/graphql-persisted/package.json b/packages/graphql-persisted/package.json index c6f565ce68..5672dacc02 100644 --- a/packages/graphql-persisted/package.json +++ b/packages/graphql-persisted/package.json @@ -4,6 +4,9 @@ "license": "MIT", "description": "Apollo and Koa integrations for persisted GraphQL queries.", "sideEffects": false, + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/graphql-persisted/tsconfig.json b/packages/graphql-persisted/tsconfig.json index b0f4bea814..6b7780d310 100644 --- a/packages/graphql-persisted/tsconfig.json +++ b/packages/graphql-persisted/tsconfig.json @@ -2,8 +2,11 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": ".", + "paths": { + "koa": ["node_modules/koa"] + } }, "include": [ "../../config/typescript/**/*", diff --git a/packages/graphql-testing/matchers.d.ts b/packages/graphql-testing/matchers.d.ts index 0a3fde6dde..6bd602938e 100644 --- a/packages/graphql-testing/matchers.d.ts +++ b/packages/graphql-testing/matchers.d.ts @@ -1 +1 @@ -export * from './dist/matchers'; +export * from './dist/src/matchers'; diff --git a/packages/graphql-testing/matchers.js b/packages/graphql-testing/matchers.js index 5d88f6c92f..8cbf091cd5 100644 --- a/packages/graphql-testing/matchers.js +++ b/packages/graphql-testing/matchers.js @@ -1 +1 @@ -module.exports = require('./dist/matchers'); +module.exports = require('./dist/src/matchers'); diff --git a/packages/graphql-testing/package.json b/packages/graphql-testing/package.json index 716ea1bdd7..472ddfac72 100644 --- a/packages/graphql-testing/package.json +++ b/packages/graphql-testing/package.json @@ -3,8 +3,11 @@ "version": "4.0.6", "license": "MIT", "description": "Utilities to create mock graphql factory.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/graphql-testing/tsconfig.json b/packages/graphql-testing/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/graphql-testing/tsconfig.json +++ b/packages/graphql-testing/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index e2e474bac7..99ada052e1 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -3,8 +3,11 @@ "version": "0.1.6", "license": "MIT", "description": "Generic i18n-related utilities.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/i18n/tsconfig.json +++ b/packages/i18n/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/jest-dom-mocks/package.json b/packages/jest-dom-mocks/package.json index f1cda7a4c3..ebc74bc0aa 100644 --- a/packages/jest-dom-mocks/package.json +++ b/packages/jest-dom-mocks/package.json @@ -3,8 +3,11 @@ "version": "2.8.5", "license": "MIT", "description": "", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/jest-dom-mocks/tsconfig.json b/packages/jest-dom-mocks/tsconfig.json index 168bbc0cb8..11678233b5 100644 --- a/packages/jest-dom-mocks/tsconfig.json +++ b/packages/jest-dom-mocks/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/jest-koa-mocks/package.json b/packages/jest-koa-mocks/package.json index 13ce78e70d..dedfdf1807 100644 --- a/packages/jest-koa-mocks/package.json +++ b/packages/jest-koa-mocks/package.json @@ -3,8 +3,11 @@ "version": "2.1.8", "license": "MIT", "description": "", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/jest-koa-mocks/tsconfig.json b/packages/jest-koa-mocks/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/jest-koa-mocks/tsconfig.json +++ b/packages/jest-koa-mocks/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/jest-mock-apollo/package.json b/packages/jest-mock-apollo/package.json index da6f055898..6829cc7f43 100644 --- a/packages/jest-mock-apollo/package.json +++ b/packages/jest-mock-apollo/package.json @@ -3,8 +3,11 @@ "version": "4.0.1", "license": "MIT", "description": "Jest + Enzyme mocks for Apollo 2.x.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/jest-mock-apollo/tsconfig.json b/packages/jest-mock-apollo/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/jest-mock-apollo/tsconfig.json +++ b/packages/jest-mock-apollo/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/jest-mock-router/package.json b/packages/jest-mock-router/package.json index f248952425..5d6c52eda9 100644 --- a/packages/jest-mock-router/package.json +++ b/packages/jest-mock-router/package.json @@ -3,8 +3,11 @@ "version": "1.0.20", "license": "MIT", "description": "Jest + Enzyme mocks for React Router 3.x.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/jest-mock-router/tsconfig.json b/packages/jest-mock-router/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/jest-mock-router/tsconfig.json +++ b/packages/jest-mock-router/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/koa-liveness-ping/package.json b/packages/koa-liveness-ping/package.json index ed8625628c..72f55b82b0 100644 --- a/packages/koa-liveness-ping/package.json +++ b/packages/koa-liveness-ping/package.json @@ -3,8 +3,11 @@ "version": "0.1.21", "license": "MIT", "description": "A package for creating a liveness ping middleware for use with koa", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-liveness-ping/tsconfig.json b/packages/koa-liveness-ping/tsconfig.json index 8ae9b5aa83..99660c095c 100644 --- a/packages/koa-liveness-ping/tsconfig.json +++ b/packages/koa-liveness-ping/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/koa-metrics/package.json b/packages/koa-metrics/package.json index 46337098cb..69526b2853 100644 --- a/packages/koa-metrics/package.json +++ b/packages/koa-metrics/package.json @@ -3,8 +3,11 @@ "version": "0.3.4", "license": "MIT", "description": "Aims to provide standard middlewares and instrumentation tooling for metrics in Koa.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-metrics/tsconfig.json b/packages/koa-metrics/tsconfig.json index 849bb587fd..1bf4f246df 100644 --- a/packages/koa-metrics/tsconfig.json +++ b/packages/koa-metrics/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/koa-performance/package.json b/packages/koa-performance/package.json index d053005dfa..f634acc70f 100644 --- a/packages/koa-performance/package.json +++ b/packages/koa-performance/package.json @@ -3,13 +3,12 @@ "version": "1.1.0", "license": "MIT", "description": "Creating a middleware that send performance related data through StatsD.", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-performance/tsconfig.json b/packages/koa-performance/tsconfig.json index a1f226ef36..42bfbfd241 100644 --- a/packages/koa-performance/tsconfig.json +++ b/packages/koa-performance/tsconfig.json @@ -3,8 +3,8 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/koa-shopify-auth/package.json b/packages/koa-shopify-auth/package.json index 32cc8fd07b..f71aa2367b 100644 --- a/packages/koa-shopify-auth/package.json +++ b/packages/koa-shopify-auth/package.json @@ -3,8 +3,11 @@ "version": "3.1.49", "license": "MIT", "description": "", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-shopify-auth/tsconfig.json b/packages/koa-shopify-auth/tsconfig.json index 9fdca2a599..1806c35257 100644 --- a/packages/koa-shopify-auth/tsconfig.json +++ b/packages/koa-shopify-auth/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/koa-shopify-graphql-proxy/package.json b/packages/koa-shopify-graphql-proxy/package.json index 50c4aa43f6..520368d826 100644 --- a/packages/koa-shopify-graphql-proxy/package.json +++ b/packages/koa-shopify-graphql-proxy/package.json @@ -3,8 +3,11 @@ "version": "3.2.1", "license": "MIT", "description": "A wrapper around koa-better-http-proxy which allows easy proxying of graphql requests from an embedded shopify app.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/koa-shopify-graphql-proxy/tsconfig.json b/packages/koa-shopify-graphql-proxy/tsconfig.json index 8ae9b5aa83..99660c095c 100644 --- a/packages/koa-shopify-graphql-proxy/tsconfig.json +++ b/packages/koa-shopify-graphql-proxy/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/koa-shopify-webhooks/package.json b/packages/koa-shopify-webhooks/package.json index 38a673f083..80782702d9 100644 --- a/packages/koa-shopify-webhooks/package.json +++ b/packages/koa-shopify-webhooks/package.json @@ -3,8 +3,11 @@ "version": "2.2.0", "license": "MIT", "description": "Receive webhooks from Shopify with ease.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/koa-shopify-webhooks/tsconfig.json b/packages/koa-shopify-webhooks/tsconfig.json index 844cb9af3c..ba01cba646 100644 --- a/packages/koa-shopify-webhooks/tsconfig.json +++ b/packages/koa-shopify-webhooks/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/logger/package.json b/packages/logger/package.json index 597181fd1b..b1de4e18f0 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -3,8 +3,11 @@ "version": "0.1.8", "license": "MIT", "description": "Opinionated logger for production-scale applications", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/logger/tsconfig.json b/packages/logger/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/logger/tsconfig.json +++ b/packages/logger/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/network/package.json b/packages/network/package.json index e2b6c04564..b2ec3954b8 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -3,8 +3,11 @@ "version": "1.4.2", "license": "MIT", "description": "Common values related to dealing with the network", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/network/tsconfig.json b/packages/network/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/network/tsconfig.json +++ b/packages/network/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/performance/package.json b/packages/performance/package.json index b5c66fe123..979b63c460 100644 --- a/packages/performance/package.json +++ b/packages/performance/package.json @@ -3,8 +3,11 @@ "version": "1.2.2", "license": "MIT", "description": "Primitives for collecting browser performance metrics.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/performance/tsconfig.json b/packages/performance/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/performance/tsconfig.json +++ b/packages/performance/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 22556c7c0c..d0c1587879 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -4,8 +4,8 @@ "license": "MIT", "description": "Blessed polyfills for web platform features.", "sideEffects": true, - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/polyfills/tsconfig.json b/packages/polyfills/tsconfig.json index 6578e36979..a392b60c3e 100644 --- a/packages/polyfills/tsconfig.json +++ b/packages/polyfills/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/predicates/package.json b/packages/predicates/package.json index d9defa54a4..4918383a13 100644 --- a/packages/predicates/package.json +++ b/packages/predicates/package.json @@ -3,8 +3,11 @@ "version": "1.2.1", "license": "MIT", "description": "A set of common Javascript predicates", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/predicates/tsconfig.json b/packages/predicates/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/predicates/tsconfig.json +++ b/packages/predicates/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-app-bridge-universal-provider/package.json b/packages/react-app-bridge-universal-provider/package.json index 75ad042d9a..87548a6bcb 100644 --- a/packages/react-app-bridge-universal-provider/package.json +++ b/packages/react-app-bridge-universal-provider/package.json @@ -3,8 +3,11 @@ "version": "1.0.12", "license": "MIT", "description": "A self-serializing/deserializing app-bridge-react provider that works for isomorphic applications.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-app-bridge-universal-provider/tsconfig.json b/packages/react-app-bridge-universal-provider/tsconfig.json index 9650dcc366..a6a6bc9562 100644 --- a/packages/react-app-bridge-universal-provider/tsconfig.json +++ b/packages/react-app-bridge-universal-provider/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-async/package.json b/packages/react-async/package.json index 7e387ce1de..454b371d36 100644 --- a/packages/react-async/package.json +++ b/packages/react-async/package.json @@ -3,8 +3,11 @@ "version": "3.1.2", "license": "MIT", "description": "Tools for creating powerful, asynchronously-loaded React components.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-async/testing.d.ts b/packages/react-async/testing.d.ts index 7e429f3423..ecd70437b7 100644 --- a/packages/react-async/testing.d.ts +++ b/packages/react-async/testing.d.ts @@ -1 +1 @@ -export * from './dist/testing'; +export * from './dist/src/testing'; diff --git a/packages/react-async/testing.js b/packages/react-async/testing.js index 7061901352..707503ace5 100644 --- a/packages/react-async/testing.js +++ b/packages/react-async/testing.js @@ -1 +1 @@ -module.exports = require('./dist/testing'); +module.exports = require('./dist/src/testing'); diff --git a/packages/react-async/tsconfig.json b/packages/react-async/tsconfig.json index bf3c7e0d10..4525593c92 100644 --- a/packages/react-async/tsconfig.json +++ b/packages/react-async/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-compose/package.json b/packages/react-compose/package.json index a1fbaec09d..4ef83e4b98 100644 --- a/packages/react-compose/package.json +++ b/packages/react-compose/package.json @@ -3,8 +3,11 @@ "version": "1.0.7", "license": "MIT", "description": "Cleanly compose multiple component enhancers together with minimal fuss", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-compose/tsconfig.json b/packages/react-compose/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-compose/tsconfig.json +++ b/packages/react-compose/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-cookie/package.json b/packages/react-cookie/package.json index 0c0a2447d1..b9aad1f495 100644 --- a/packages/react-cookie/package.json +++ b/packages/react-cookie/package.json @@ -3,13 +3,12 @@ "version": "0.0.9", "license": "MIT", "description": "Cookies in React for the server and client", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-cookie/tsconfig.json b/packages/react-cookie/tsconfig.json index 601258d136..ecad5bd1a5 100644 --- a/packages/react-cookie/tsconfig.json +++ b/packages/react-cookie/tsconfig.json @@ -3,8 +3,8 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-csrf-universal-provider/package.json b/packages/react-csrf-universal-provider/package.json index b97ca68cdf..3e6baeca56 100644 --- a/packages/react-csrf-universal-provider/package.json +++ b/packages/react-csrf-universal-provider/package.json @@ -3,8 +3,11 @@ "version": "1.0.12", "license": "MIT", "description": "A self-serializing/deserializing CSRF token provider that works for for isomorphic applications.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-csrf-universal-provider/tsconfig.json b/packages/react-csrf-universal-provider/tsconfig.json index 1372a345f7..a1f30c8ac2 100644 --- a/packages/react-csrf-universal-provider/tsconfig.json +++ b/packages/react-csrf-universal-provider/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-csrf/package.json b/packages/react-csrf/package.json index 016c718f14..fe6bbf44ae 100644 --- a/packages/react-csrf/package.json +++ b/packages/react-csrf/package.json @@ -3,8 +3,11 @@ "version": "1.0.7", "license": "MIT", "description": "Share csrf token throughout a react application.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-csrf/tsconfig.json b/packages/react-csrf/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-csrf/tsconfig.json +++ b/packages/react-csrf/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-effect-apollo/package.json b/packages/react-effect-apollo/package.json index dbb0f3725e..66691612f2 100644 --- a/packages/react-effect-apollo/package.json +++ b/packages/react-effect-apollo/package.json @@ -3,8 +3,11 @@ "version": "4.0.0", "license": "MIT", "description": "A bridging layer between react-apollo and react-effect.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-effect-apollo/tsconfig.json b/packages/react-effect-apollo/tsconfig.json index 61f0fbb5b7..856608ca2a 100644 --- a/packages/react-effect-apollo/tsconfig.json +++ b/packages/react-effect-apollo/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src", + "baseUrl": ".", + "rootDir": ".", "skipLibCheck": true }, "include": [ diff --git a/packages/react-effect/package.json b/packages/react-effect/package.json index bd2627d99d..f435a07417 100644 --- a/packages/react-effect/package.json +++ b/packages/react-effect/package.json @@ -3,8 +3,11 @@ "version": "3.2.7", "license": "MIT", "description": "A component and set of utilities for performing effects within a universal React app", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-effect/server.d.ts b/packages/react-effect/server.d.ts index 699fd532ab..b940dac216 100644 --- a/packages/react-effect/server.d.ts +++ b/packages/react-effect/server.d.ts @@ -1 +1 @@ -export * from './dist/server'; +export * from './dist/src/server'; diff --git a/packages/react-effect/server.js b/packages/react-effect/server.js index 0e07caec85..6747a13a2d 100644 --- a/packages/react-effect/server.js +++ b/packages/react-effect/server.js @@ -1 +1 @@ -module.exports = require('./dist/server'); +module.exports = require('./dist/src/server'); diff --git a/packages/react-effect/tsconfig.json b/packages/react-effect/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-effect/tsconfig.json +++ b/packages/react-effect/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-form-state/package.json b/packages/react-form-state/package.json index a7c3c60eb7..c73b73e947 100644 --- a/packages/react-form-state/package.json +++ b/packages/react-form-state/package.json @@ -3,8 +3,11 @@ "version": "0.11.14", "license": "MIT", "description": "Manage react forms tersely and type-safe with no magic.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-form-state/tsconfig.json b/packages/react-form-state/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-form-state/tsconfig.json +++ b/packages/react-form-state/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-form/package.json b/packages/react-form/package.json index 8cdf2c06b4..1dbd72d303 100644 --- a/packages/react-form/package.json +++ b/packages/react-form/package.json @@ -3,8 +3,11 @@ "version": "0.3.28", "license": "MIT", "description": "Manage react forms tersely and safely-typed with no magic using React hooks.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-form/tsconfig.json b/packages/react-form/tsconfig.json index d77632cee8..e2ad5c0fa0 100644 --- a/packages/react-form/tsconfig.json +++ b/packages/react-form/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-google-analytics/package.json b/packages/react-google-analytics/package.json index b40e39c09a..9ef0f26c99 100644 --- a/packages/react-google-analytics/package.json +++ b/packages/react-google-analytics/package.json @@ -3,8 +3,11 @@ "version": "3.0.20", "license": "MIT", "description": "Google Analytics", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-google-analytics/tsconfig.json b/packages/react-google-analytics/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-google-analytics/tsconfig.json +++ b/packages/react-google-analytics/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-graphql-universal-provider/package.json b/packages/react-graphql-universal-provider/package.json index 59f29e5af9..5b58ff01d4 100644 --- a/packages/react-graphql-universal-provider/package.json +++ b/packages/react-graphql-universal-provider/package.json @@ -3,8 +3,11 @@ "version": "2.1.2", "license": "MIT", "description": "A self-serializing/deserializing GraphQL provider that works for isomorphic applications.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-graphql-universal-provider/tsconfig.json b/packages/react-graphql-universal-provider/tsconfig.json index c383a352ea..3563903a00 100644 --- a/packages/react-graphql-universal-provider/tsconfig.json +++ b/packages/react-graphql-universal-provider/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-graphql/package.json b/packages/react-graphql/package.json index f39268f0ae..84cb39a0c0 100644 --- a/packages/react-graphql/package.json +++ b/packages/react-graphql/package.json @@ -3,8 +3,11 @@ "version": "6.0.2", "license": "MIT", "description": "Tools for creating type-safe and asynchronous GraphQL components for React.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-graphql/tsconfig.json b/packages/react-graphql/tsconfig.json index a57c28d795..81f5a8852f 100644 --- a/packages/react-graphql/tsconfig.json +++ b/packages/react-graphql/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json index 620aa13648..a719fa8aa0 100644 --- a/packages/react-hooks/package.json +++ b/packages/react-hooks/package.json @@ -3,8 +3,11 @@ "version": "1.3.0", "license": "MIT", "description": "A collection of primitive React hooks.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-hooks/tsconfig.json b/packages/react-hooks/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-hooks/tsconfig.json +++ b/packages/react-hooks/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-html/package.json b/packages/react-html/package.json index 3732b9b551..05646bfd2f 100644 --- a/packages/react-html/package.json +++ b/packages/react-html/package.json @@ -3,8 +3,11 @@ "version": "9.2.8", "license": "MIT", "description": "A component to render your react app with no static HTML.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-html/server.d.ts b/packages/react-html/server.d.ts index 699fd532ab..b940dac216 100644 --- a/packages/react-html/server.d.ts +++ b/packages/react-html/server.d.ts @@ -1 +1 @@ -export * from './dist/server'; +export * from './dist/src/server'; diff --git a/packages/react-html/server.js b/packages/react-html/server.js index 0e07caec85..6747a13a2d 100644 --- a/packages/react-html/server.js +++ b/packages/react-html/server.js @@ -1 +1 @@ -module.exports = require('./dist/server'); +module.exports = require('./dist/src/server'); diff --git a/packages/react-html/tsconfig.json b/packages/react-html/tsconfig.json index 691519e54e..7ff0ff6458 100644 --- a/packages/react-html/tsconfig.json +++ b/packages/react-html/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-hydrate/package.json b/packages/react-hydrate/package.json index e86eda0e30..43f9e41d6c 100644 --- a/packages/react-hydrate/package.json +++ b/packages/react-hydrate/package.json @@ -3,8 +3,11 @@ "version": "1.1.9", "license": "MIT", "description": "Utilities for hydrating server-rendered React apps", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-hydrate/tsconfig.json b/packages/react-hydrate/tsconfig.json index 2dc9245e28..6354acd60f 100644 --- a/packages/react-hydrate/tsconfig.json +++ b/packages/react-hydrate/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-i18n-universal-provider/package.json b/packages/react-i18n-universal-provider/package.json index 3273f2683d..65cce61bac 100644 --- a/packages/react-i18n-universal-provider/package.json +++ b/packages/react-i18n-universal-provider/package.json @@ -3,8 +3,11 @@ "version": "1.0.24", "license": "MIT", "description": "A self-serializing/deserializing i18n provider that works for isomorphic applications.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-i18n-universal-provider/tsconfig.json b/packages/react-i18n-universal-provider/tsconfig.json index 7596b72a0e..2c298d0c24 100644 --- a/packages/react-i18n-universal-provider/tsconfig.json +++ b/packages/react-i18n-universal-provider/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-i18n/babel.d.ts b/packages/react-i18n/babel.d.ts index f7a5261b74..89396c95af 100644 --- a/packages/react-i18n/babel.d.ts +++ b/packages/react-i18n/babel.d.ts @@ -1,2 +1,2 @@ -export {default} from './dist/babel-plugin'; -export * from './dist/babel-plugin'; +export {default} from './dist/src/babel-plugin'; +export * from './dist/src/babel-plugin'; diff --git a/packages/react-i18n/babel.js b/packages/react-i18n/babel.js index ecb6e1f242..e65b208720 100644 --- a/packages/react-i18n/babel.js +++ b/packages/react-i18n/babel.js @@ -1 +1 @@ -module.exports = require('./dist/babel-plugin'); +module.exports = require('./dist/src/babel-plugin'); diff --git a/packages/react-i18n/package.json b/packages/react-i18n/package.json index 617bd85a5a..609070f48c 100644 --- a/packages/react-i18n/package.json +++ b/packages/react-i18n/package.json @@ -3,8 +3,11 @@ "version": "2.1.7", "license": "MIT", "description": "i18n utilities for React handling translations, formatting, and more.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-i18n/tsconfig.json b/packages/react-i18n/tsconfig.json index aa3527a2bc..f4402a6dc8 100644 --- a/packages/react-i18n/tsconfig.json +++ b/packages/react-i18n/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-idle/package.json b/packages/react-idle/package.json index 985da7e2be..e7f519cd35 100644 --- a/packages/react-idle/package.json +++ b/packages/react-idle/package.json @@ -3,8 +3,11 @@ "version": "1.0.12", "license": "MIT", "description": "Utilities for working with idle callbacks in React", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-idle/tsconfig.json b/packages/react-idle/tsconfig.json index 28b2f86b80..c4654c0e7d 100644 --- a/packages/react-idle/tsconfig.json +++ b/packages/react-idle/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-import-remote/package.json b/packages/react-import-remote/package.json index 475c4c4ad3..774fe110a7 100644 --- a/packages/react-import-remote/package.json +++ b/packages/react-import-remote/package.json @@ -3,8 +3,11 @@ "version": "1.0.23", "license": "MIT", "description": "Asynchronous script loading for React", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-import-remote/tsconfig.json b/packages/react-import-remote/tsconfig.json index 9650dcc366..a6a6bc9562 100644 --- a/packages/react-import-remote/tsconfig.json +++ b/packages/react-import-remote/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-intersection-observer/package.json b/packages/react-intersection-observer/package.json index db527e2188..bcdf2aebd6 100644 --- a/packages/react-intersection-observer/package.json +++ b/packages/react-intersection-observer/package.json @@ -3,8 +3,11 @@ "version": "2.0.9", "license": "MIT", "description": "A React wrapper around the IntersectionObserver API", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-intersection-observer/tsconfig.json b/packages/react-intersection-observer/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-intersection-observer/tsconfig.json +++ b/packages/react-intersection-observer/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-network/package.json b/packages/react-network/package.json index fbd73c0a92..a602200b8d 100644 --- a/packages/react-network/package.json +++ b/packages/react-network/package.json @@ -3,8 +3,11 @@ "version": "3.3.6", "license": "MIT", "description": "A collection of components that allow you to set common HTTP headers from within your React application.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-network/server.d.ts b/packages/react-network/server.d.ts index 699fd532ab..b940dac216 100644 --- a/packages/react-network/server.d.ts +++ b/packages/react-network/server.d.ts @@ -1 +1 @@ -export * from './dist/server'; +export * from './dist/src/server'; diff --git a/packages/react-network/server.js b/packages/react-network/server.js index 0e07caec85..6747a13a2d 100644 --- a/packages/react-network/server.js +++ b/packages/react-network/server.js @@ -1 +1 @@ -module.exports = require('./dist/server'); +module.exports = require('./dist/src/server'); diff --git a/packages/react-network/tsconfig.json b/packages/react-network/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-network/tsconfig.json +++ b/packages/react-network/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-performance/package.json b/packages/react-performance/package.json index 8e798630cc..56b8cc4bed 100644 --- a/packages/react-performance/package.json +++ b/packages/react-performance/package.json @@ -3,13 +3,12 @@ "version": "1.2.1", "license": "MIT", "description": "Primitives to measure your React application's performance using @shopify/performance", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" @@ -31,8 +30,7 @@ "react": ">=16.8.0 <17.0.0" }, "devDependencies": { - "@shopify/network": "^1.4.2", - "typescript": "~3.2.1" + "@shopify/network": "^1.4.2" }, "files": [ "dist/*" diff --git a/packages/react-performance/tsconfig.json b/packages/react-performance/tsconfig.json index 5ee0343fdb..960606e35b 100644 --- a/packages/react-performance/tsconfig.json +++ b/packages/react-performance/tsconfig.json @@ -3,8 +3,8 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-preconnect/tsconfig.json b/packages/react-preconnect/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-preconnect/tsconfig.json +++ b/packages/react-preconnect/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 2716ea83ba..ec9aead7ef 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -3,8 +3,11 @@ "version": "0.0.16", "license": "MIT", "description": "A universal router for React.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-router/tsconfig.json b/packages/react-router/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-router/tsconfig.json +++ b/packages/react-router/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-self-serializers/package.json b/packages/react-self-serializers/package.json deleted file mode 100644 index ba629bc5cc..0000000000 --- a/packages/react-self-serializers/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@shopify/react-self-serializers", - "version": "1.3.15", - "license": "MIT", - "description": "A set of self-serializing providers for @shopify/react-html applications", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, - "publishConfig": { - "access": "public", - "@shopify:registry": "https://registry.npmjs.org" - }, - "author": "Shopify Inc.", - "repository": { - "type": "git", - "url": "git+https://github.com/Shopify/quilt.git" - }, - "bugs": { - "url": "https://github.com/shopify/quilt/issues" - }, - "homepage": "https://github.com/Shopify/quilt/blob/master/packages/react-self-serializers/README.md", - "devDependencies": { - "@shopify/app-bridge-react": "^1.6.7", - "@shopify/react-graphql": "^5.1.3", - "@shopify/react-html": "^8.1.3", - "@shopify/react-i18n": "^1.8.2", - "@shopify/react-testing": "^1.7.8", - "@types/faker": "4.1.5", - "faker": "^4.1.0" - }, - "peerDependencies": { - "@shopify/app-bridge-react": ">=1.5.0", - "@shopify/react-graphql": ">=4.0.3", - "@shopify/react-html": ">=2.0.0", - "@shopify/react-i18n": ">=1.2.3", - "react": ">=16.8.0" - }, - "files": [ - "dist/*", - "AppBridge.js", - "AppBridge.d.ts", - "create-self-serializer.js", - "create-self-serializer.d.ts", - "GraphQL.js", - "GraphQL.d.ts", - "I18n.js", - "I18n.d.ts" - ] -} diff --git a/packages/react-self-serializers/src/I18n.tsx b/packages/react-self-serializers/src/I18n.tsx deleted file mode 100644 index 3bf98323dc..0000000000 --- a/packages/react-self-serializers/src/I18n.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import React, {useRef} from 'react'; -import {useSerialized, useHtmlAttributes} from '@shopify/react-html'; -import {I18nContext, I18nDetails, I18nManager} from '@shopify/react-i18n'; - -interface Props extends Partial { - children?: React.ReactNode; -} - -interface Serialized { - i18nDetails: I18nDetails; - translations: ReturnType; -} - -/** - * A self-serializing provider for `@shopify/i18n`'s I18nManager. - * On the server it serializes it's props to the DOM, on the client it retrieves the serialized props and rehydrates using them. - * - * @param props an object containing the React children to render and any options to use when configuring the `I18nManager` to provide to the tree - * @returns JSX wrapping the given children in an `` and a `` component. - */ -export function I18n({children, ...givenI18nDetails}: Props) { - const [serialized, Serialize] = useSerialized('i18n'); - - const i18nDetails: I18nDetails = { - locale: givenI18nDetails.fallbackLocale || 'en', - ...givenI18nDetails, - ...(serialized ? serialized.i18nDetails : {}), - }; - - const manager = useRef( - new I18nManager( - i18nDetails, - serialized ? serialized.translations : undefined, - ), - ); - - useHtmlAttributes({lang: i18nDetails.locale}); - - return ( - <> - - {children} - - { - const getData = () => ({ - translations: manager.current.extract(), - i18nDetails, - }); - - if (manager.current.loading) { - return manager.current.resolve().then(getData); - } - - return getData(); - }} - /> - - ); -} diff --git a/packages/react-self-serializers/tsconfig.json b/packages/react-self-serializers/tsconfig.json deleted file mode 100644 index 70299746e4..0000000000 --- a/packages/react-self-serializers/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "../tsconfig_base.json", - "compilerOptions": { - "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" - }, - "include": [ - "../../config/typescript/**/*", - "./src/**/*.ts", - "./src/**/*.tsx" - ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"], - "references": [ - {"path": "../react-graphql"}, - {"path": "../react-html"}, - {"path": "../react-hooks"} - ] -} diff --git a/packages/react-serialize/package.json b/packages/react-serialize/package.json index 1886e0c9a5..b729fdf57d 100644 --- a/packages/react-serialize/package.json +++ b/packages/react-serialize/package.json @@ -3,8 +3,11 @@ "version": "1.0.18", "license": "MIT", "description": "Provides an idiomatic way to serialize data for rehydration in a universal react application.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-serialize/tsconfig.json b/packages/react-serialize/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-serialize/tsconfig.json +++ b/packages/react-serialize/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-server-webpack-plugin/package.json b/packages/react-server-webpack-plugin/package.json index 707b28d6d3..044d0fcee3 100644 --- a/packages/react-server-webpack-plugin/package.json +++ b/packages/react-server-webpack-plugin/package.json @@ -3,8 +3,11 @@ "version": "2.2.14", "license": "MIT", "description": "A webpack plugin that generates entrypoints for @shopify/react-server based applications", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-server-webpack-plugin/tsconfig.json b/packages/react-server-webpack-plugin/tsconfig.json index 5ee0343fdb..e06fece6c6 100644 --- a/packages/react-server-webpack-plugin/tsconfig.json +++ b/packages/react-server-webpack-plugin/tsconfig.json @@ -3,13 +3,14 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", "./src/**/*.ts", "./src/**/*.tsx" ], - "exclude": ["**/*.test.ts", "**/*.test.tsx"] + "exclude": ["**/*.test.ts", "**/*.test.tsx"], + "references": [{"path": "../react-html"}, {"path": "../react-server"}] } diff --git a/packages/react-server/package.json b/packages/react-server/package.json index 797610e692..3042acceb2 100644 --- a/packages/react-server/package.json +++ b/packages/react-server/package.json @@ -3,8 +3,11 @@ "version": "0.8.2", "license": "MIT", "description": "Utilities for React server-side rendering.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-server/tsconfig.json b/packages/react-server/tsconfig.json index 4cb9ee60a6..c8e85fc50e 100644 --- a/packages/react-server/tsconfig.json +++ b/packages/react-server/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", @@ -11,5 +11,18 @@ "./src/**/*.tsx" ], "exclude": ["**/*.test.ts", "**/*.test.tsx"], - "references": [{"path": "../react-async"}, {"path": "../sewing-kit-koa"}] + "references": [ + {"path": "../react-async"}, + {"path": "../sewing-kit-koa"}, + {"path": "../network"}, + {"path": "../react-network"}, + {"path": "../react-cookie"}, + {"path": "../react-csrf-universal-provider"}, + {"path": "../with-env"}, + {"path": "../sewing-kit-koa"}, + {"path": "../react-html"}, + {"path": "../useful-types"}, + {"path": "../react-hydrate"}, + {"path": "../react-effect"} + ] } diff --git a/packages/react-shopify-app-route-propagator/package.json b/packages/react-shopify-app-route-propagator/package.json index b2b02d0680..cceb1a2c87 100644 --- a/packages/react-shopify-app-route-propagator/package.json +++ b/packages/react-shopify-app-route-propagator/package.json @@ -3,8 +3,11 @@ "version": "3.0.4", "license": "MIT", "description": "", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-shopify-app-route-propagator/tsconfig.json b/packages/react-shopify-app-route-propagator/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-shopify-app-route-propagator/tsconfig.json +++ b/packages/react-shopify-app-route-propagator/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-shortcuts/package.json b/packages/react-shortcuts/package.json index e518d22cf6..c2144f0cb1 100644 --- a/packages/react-shortcuts/package.json +++ b/packages/react-shortcuts/package.json @@ -3,8 +3,11 @@ "version": "3.0.9", "license": "MIT", "description": "Declaratively and efficiently match shortcut combinations in your react application", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-shortcuts/tsconfig.json b/packages/react-shortcuts/tsconfig.json index 38f3f1c198..4c83bd9c76 100644 --- a/packages/react-shortcuts/tsconfig.json +++ b/packages/react-shortcuts/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-testing/matchers.d.ts b/packages/react-testing/matchers.d.ts index 0a3fde6dde..6bd602938e 100644 --- a/packages/react-testing/matchers.d.ts +++ b/packages/react-testing/matchers.d.ts @@ -1 +1 @@ -export * from './dist/matchers'; +export * from './dist/src/matchers'; diff --git a/packages/react-testing/matchers.js b/packages/react-testing/matchers.js index 5d88f6c92f..8cbf091cd5 100644 --- a/packages/react-testing/matchers.js +++ b/packages/react-testing/matchers.js @@ -1 +1 @@ -module.exports = require('./dist/matchers'); +module.exports = require('./dist/src/matchers'); diff --git a/packages/react-testing/package.json b/packages/react-testing/package.json index ff236d494c..9b09fd22cc 100644 --- a/packages/react-testing/package.json +++ b/packages/react-testing/package.json @@ -3,8 +3,11 @@ "version": "1.8.4", "license": "MIT", "description": "A library for testing React components according to our conventions.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-testing/tsconfig.json b/packages/react-testing/tsconfig.json index 6578e36979..a392b60c3e 100644 --- a/packages/react-testing/tsconfig.json +++ b/packages/react-testing/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-tracking-pixel/package.json b/packages/react-tracking-pixel/package.json index 7c0d80f260..b8d0e5d320 100644 --- a/packages/react-tracking-pixel/package.json +++ b/packages/react-tracking-pixel/package.json @@ -3,8 +3,11 @@ "version": "3.0.28", "license": "MIT", "description": "Allows React apps to easily embed tracking pixel iframes", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-tracking-pixel/tsconfig.json b/packages/react-tracking-pixel/tsconfig.json index 9650dcc366..a6a6bc9562 100644 --- a/packages/react-tracking-pixel/tsconfig.json +++ b/packages/react-tracking-pixel/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-universal-provider/package.json b/packages/react-universal-provider/package.json index 325a0991a4..73e4eecef0 100644 --- a/packages/react-universal-provider/package.json +++ b/packages/react-universal-provider/package.json @@ -3,8 +3,11 @@ "version": "1.0.14", "license": "MIT", "description": "Factory function and utilities to create self-serializing/deserializing provider that works for isomorphic applications.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/react-universal-provider/tsconfig.json b/packages/react-universal-provider/tsconfig.json index 9650dcc366..a6a6bc9562 100644 --- a/packages/react-universal-provider/tsconfig.json +++ b/packages/react-universal-provider/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/react-web-worker/package.json b/packages/react-web-worker/package.json index b542660340..4129fe0152 100644 --- a/packages/react-web-worker/package.json +++ b/packages/react-web-worker/package.json @@ -3,13 +3,12 @@ "version": "1.2.1", "license": "MIT", "description": "A hook for using web workers in React applications", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/react-web-worker/tsconfig.json b/packages/react-web-worker/tsconfig.json index 37240c2970..9027b1c81d 100644 --- a/packages/react-web-worker/tsconfig.json +++ b/packages/react-web-worker/tsconfig.json @@ -3,8 +3,8 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": ["./src/**/*.ts", "./src/**/*.tsx"], "exclude": ["**/*.test.ts", "**/*.test.tsx"], diff --git a/packages/rpc/package.json b/packages/rpc/package.json index 87a4bcbb2c..aabee6089f 100644 --- a/packages/rpc/package.json +++ b/packages/rpc/package.json @@ -3,13 +3,12 @@ "version": "1.0.1", "license": "MIT", "description": "Utilities for postmessage-based remote procedure calls.", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/rpc/tsconfig.json b/packages/rpc/tsconfig.json index 5ee0343fdb..960606e35b 100644 --- a/packages/rpc/tsconfig.json +++ b/packages/rpc/tsconfig.json @@ -3,8 +3,8 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/semaphore/package.json b/packages/semaphore/package.json index 9e2c56e178..fbaff4838e 100644 --- a/packages/semaphore/package.json +++ b/packages/semaphore/package.json @@ -3,8 +3,11 @@ "version": "1.0.1", "license": "MIT", "description": "Counting semaphore", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/semaphore/tsconfig.json b/packages/semaphore/tsconfig.json index c1ac52e504..9c050af46c 100644 --- a/packages/semaphore/tsconfig.json +++ b/packages/semaphore/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/sewing-kit-koa/package.json b/packages/sewing-kit-koa/package.json index 72118bb071..16ad45f2dc 100644 --- a/packages/sewing-kit-koa/package.json +++ b/packages/sewing-kit-koa/package.json @@ -3,8 +3,11 @@ "version": "6.1.5", "license": "MIT", "description": "Easily access Sewing Kit assets from a Koa server.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/packages/sewing-kit-koa/tsconfig.json b/packages/sewing-kit-koa/tsconfig.json index 5712f4428b..35f07c9b4f 100644 --- a/packages/sewing-kit-koa/tsconfig.json +++ b/packages/sewing-kit-koa/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/statsd/package.json b/packages/statsd/package.json index a3e50358be..b0265295d3 100644 --- a/packages/statsd/package.json +++ b/packages/statsd/package.json @@ -3,13 +3,12 @@ "version": "1.1.0", "license": "MIT", "description": "An opinionated StatsD client for Shopify Node.js server and other StatsD utilities.", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/statsd/tsconfig.json b/packages/statsd/tsconfig.json index 5ee0343fdb..960606e35b 100644 --- a/packages/statsd/tsconfig.json +++ b/packages/statsd/tsconfig.json @@ -3,8 +3,8 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/packages/tsconfig.json b/packages/tsconfig.json index efd56fa79f..1c1e2f90d2 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -57,7 +57,6 @@ {"path": "./react-performance"}, {"path": "./react-preconnect"}, {"path": "./react-router"}, - {"path": "./react-self-serializers"}, {"path": "./react-serialize"}, {"path": "./react-server"}, {"path": "./react-server-webpack-plugin"}, diff --git a/packages/useful-types/package.json b/packages/useful-types/package.json index df401f36bd..cf90a7ecd8 100644 --- a/packages/useful-types/package.json +++ b/packages/useful-types/package.json @@ -3,8 +3,11 @@ "version": "2.1.0", "license": "MIT", "description": "A few handy TypeScript types", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/useful-types/tsconfig.json b/packages/useful-types/tsconfig.json index db6b399ba8..c9c8ebc2a0 100644 --- a/packages/useful-types/tsconfig.json +++ b/packages/useful-types/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": ["./src/**/*.ts"] } diff --git a/packages/web-worker/babel.d.ts b/packages/web-worker/babel.d.ts index f7a5261b74..89396c95af 100644 --- a/packages/web-worker/babel.d.ts +++ b/packages/web-worker/babel.d.ts @@ -1,2 +1,2 @@ -export {default} from './dist/babel-plugin'; -export * from './dist/babel-plugin'; +export {default} from './dist/src/babel-plugin'; +export * from './dist/src/babel-plugin'; diff --git a/packages/web-worker/babel.js b/packages/web-worker/babel.js index ecb6e1f242..e65b208720 100644 --- a/packages/web-worker/babel.js +++ b/packages/web-worker/babel.js @@ -1 +1 @@ -module.exports = require('./dist/babel-plugin'); +module.exports = require('./dist/src/babel-plugin'); diff --git a/packages/web-worker/package.json b/packages/web-worker/package.json index 6197dbd722..9b7050e9bc 100644 --- a/packages/web-worker/package.json +++ b/packages/web-worker/package.json @@ -3,13 +3,12 @@ "version": "1.3.1", "license": "MIT", "description": "Tools for making web workers fun to use.", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "sideEffects": false, + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", "scripts": { - "build": "tsc --p tsconfig.build.json", - "prepublishOnly": "yarn run build" + "build": "tsc --p tsconfig.json" }, + "sideEffects": false, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/web-worker/tsconfig.json b/packages/web-worker/tsconfig.json index 7ce070f3c1..4e519176e6 100644 --- a/packages/web-worker/tsconfig.json +++ b/packages/web-worker/tsconfig.json @@ -3,8 +3,11 @@ "compileOnSave": false, "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": ".", + "paths": { + "webpack": ["node_modules/webpack"] + } }, "include": [ "../../config/typescript/**/*", diff --git a/packages/web-worker/webpack.d.ts b/packages/web-worker/webpack.d.ts index c36c1c3864..71d795fd8b 100644 --- a/packages/web-worker/webpack.d.ts +++ b/packages/web-worker/webpack.d.ts @@ -1,2 +1,2 @@ -export {default} from './dist/webpack-parts'; -export * from './dist/webpack-parts'; +export {default} from './dist/src/webpack-parts'; +export * from './dist/src/webpack-parts'; diff --git a/packages/web-worker/webpack.js b/packages/web-worker/webpack.js index 9ab2e0815a..50b1219cf1 100644 --- a/packages/web-worker/webpack.js +++ b/packages/web-worker/webpack.js @@ -1 +1 @@ -module.exports = require('./dist/webpack-parts'); +module.exports = require('./dist/src/webpack-parts'); diff --git a/packages/web-worker/worker.d.ts b/packages/web-worker/worker.d.ts index dca3663106..feafe83456 100644 --- a/packages/web-worker/worker.d.ts +++ b/packages/web-worker/worker.d.ts @@ -1,2 +1,2 @@ -export {default} from './dist/worker'; -export * from './dist/worker'; +export {default} from './dist/src/worker'; +export * from './dist/src/worker'; diff --git a/packages/web-worker/worker.js b/packages/web-worker/worker.js index 16e10be898..7f964edf0f 100644 --- a/packages/web-worker/worker.js +++ b/packages/web-worker/worker.js @@ -1 +1 @@ -module.exports = require('./dist/worker'); +module.exports = require('./dist/src/worker'); diff --git a/packages/with-env/package.json b/packages/with-env/package.json index 12f56c854c..00a064293d 100644 --- a/packages/with-env/package.json +++ b/packages/with-env/package.json @@ -3,8 +3,11 @@ "version": "1.1.2", "license": "MIT", "description": "A utility for executing code under a specific NODE_ENV.", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "publishConfig": { "access": "public", "@shopify:registry": "https://registry.npmjs.org" diff --git a/packages/with-env/tsconfig.json b/packages/with-env/tsconfig.json index cc0e93b1f3..1d7acfe46f 100644 --- a/packages/with-env/tsconfig.json +++ b/packages/with-env/tsconfig.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": ["./src/**/*.ts"], "exclude": ["**/*.test.ts"] diff --git a/templates/package.hbs.json b/templates/package.hbs.json index 28cce8d9b6..9d3ac268fb 100644 --- a/templates/package.hbs.json +++ b/templates/package.hbs.json @@ -3,8 +3,11 @@ "version": "0.0.0", "license": "MIT", "description": "{{description}}", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "dist/src/index.js", + "types": "dist/src/index.d.ts", + "scripts": { + "build": "tsc --p tsconfig.json" + }, "sideEffects": false, "publishConfig": { "access": "public", diff --git a/templates/tsconfig.build.hbs.json b/templates/tsconfig.hbs.json similarity index 83% rename from templates/tsconfig.build.hbs.json rename to templates/tsconfig.hbs.json index 38f3f1c198..4c83bd9c76 100644 --- a/templates/tsconfig.build.hbs.json +++ b/templates/tsconfig.hbs.json @@ -2,8 +2,8 @@ "extends": "../tsconfig_base.json", "compilerOptions": { "outDir": "./dist", - "baseUrl": "./src", - "rootDir": "./src" + "baseUrl": ".", + "rootDir": "." }, "include": [ "../../config/typescript/**/*", diff --git a/yarn.lock b/yarn.lock index ac0270bc2c..00a036406e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10666,11 +10666,6 @@ typescript@^3.6.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54" integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw== -typescript@~3.2.1: - version "3.2.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.4.tgz#c585cb952912263d915b462726ce244ba510ef3d" - integrity sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg== - ua-parser-js@^0.7.18: version "0.7.20" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.20.tgz#7527178b82f6a62a0f243d1f94fd30e3e3c21098" From 5ec4a474998f2c0cb12f7698d3ebd2e89bf55fac Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Wed, 13 Nov 2019 23:33:51 -0500 Subject: [PATCH 10/11] Add tests for project reference things --- plopfile.js | 4 +-- test/typescript-project-references.test.ts | 29 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test/typescript-project-references.test.ts diff --git a/plopfile.js b/plopfile.js index 943f406acb..bba7cd8b28 100644 --- a/plopfile.js +++ b/plopfile.js @@ -32,8 +32,8 @@ module.exports = function(plop) { }, { type: 'add', - path: 'packages/{{kebabCase name}}/tsconfig.build.json', - templateFile: 'templates/tsconfig.build.hbs.json', + path: 'packages/{{kebabCase name}}/tsconfig.json', + templateFile: 'templates/tsconfig.hbs.json', }, { type: 'add', diff --git a/test/typescript-project-references.test.ts b/test/typescript-project-references.test.ts new file mode 100644 index 0000000000..e0d199ae36 --- /dev/null +++ b/test/typescript-project-references.test.ts @@ -0,0 +1,29 @@ +import {resolve} from 'path'; + +import {readJSONSync} from 'fs-extra'; +import glob from 'glob'; + +const IGNORE_REGEX = [ + /tsconfig\.json/, + /tsconfig_base\.json/, + /react-self-serializer/, +]; + +const ROOT = resolve(__dirname, '..'); +const projectReferencesConfig = resolve(ROOT, 'packages', 'tsconfig.json'); + +describe('typescript project references', () => { + it('includes all the packages', () => { + const referencesConfig = readJSONSync(projectReferencesConfig); + const references = referencesConfig.references.map(({path}) => + path.replace('./', ''), + ); + + const packages = glob + .sync(resolve(ROOT, 'packages', '*')) + .filter(filePath => !IGNORE_REGEX.some(regex => regex.test(filePath))) + .map(packagePath => packagePath.split('quilt/packages/')[1]); + + expect(packages).toStrictEqual(references); + }); +}); From 6b4364ef5af63d4254f022e78537e74c61b6b427 Mon Sep 17 00:00:00 2001 From: Ismail Syed Date: Fri, 15 Nov 2019 14:12:07 -0500 Subject: [PATCH 11/11] yarn.lock fix --- yarn.lock | 59 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 57 deletions(-) diff --git a/yarn.lock b/yarn.lock index 00a036406e..d939531d7f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1088,23 +1088,11 @@ dependencies: "@shopify/app-bridge" "^1.8.0" -"@shopify/app-bridge-react@^1.6.7": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@shopify/app-bridge-react/-/app-bridge-react-1.10.1.tgz#c965ecfa1b0349e7d53483b1e3ba5e9a6dab24d5" - integrity sha512-/PQz38xNaDzGfOhKYrbx5QxBGEmpJe3+zlbcp1zFtLzJdxtwvxRadlN4ILaZmGnM5h9meJk8YEt7Jks7Kbd8eQ== - dependencies: - "@shopify/app-bridge" "^1.10.1" - "@shopify/app-bridge@^0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/@shopify/app-bridge/-/app-bridge-0.7.3.tgz#abadfa2ef6293f630764bc5ddca31750caf00f1c" integrity sha512-xDkYvVvN8Gxy3JZduoT4Ohrl6fAuW+wEfhfL+qPzysu0LuJZ7CKgVCdEazPmtcI+V4GQPQLYLzcbCn3mWFU8dg== -"@shopify/app-bridge@^1.10.1": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@shopify/app-bridge/-/app-bridge-1.10.1.tgz#26daf94a5aa9b4c51c64ce48c72e18bcab18efef" - integrity sha512-qDyBiiZfnyaL3vEoWc7FZy5A7ouvRdR3D/Q/1VoPzMcQKNtC2yRq1h6P+674WbUav+jC11pY/qiaNlKOEaUiDg== - "@shopify/app-bridge@^1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@shopify/app-bridge/-/app-bridge-1.8.0.tgz#c11bda4d7db5310d04080e604a40a017948dd547" @@ -1120,26 +1108,7 @@ lodash "^4.17.4" lodash-decorators "^4.3.5" -"@shopify/react-graphql@^5.1.3": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@shopify/react-graphql/-/react-graphql-5.2.5.tgz#3c18f00a9a9f99c7ef462aff626f7b78c3117970" - integrity sha512-KuOftm/uyhK5dEPdnITRSKiaqo9fxU9e3h7M/Trdyydo7tj3+f1N5xEbIBCeZN4n+ZwyGue2BQcwuavzDmiWqA== - dependencies: - "@shopify/async" "^2.0.9" - "@shopify/react-async" "^3.0.13" - "@shopify/react-effect" "^3.2.5" - "@shopify/react-hooks" "^1.3.0" - "@shopify/react-idle" "^1.0.10" - "@shopify/react-network" "^3.3.4" - "@shopify/useful-types" "^2.0.2" - apollo-cache-inmemory ">=1.0.0 <2.0.0" - apollo-client ">=2.0.0 <3.0.0" - apollo-link ">=1.0.0 <2.0.0" - apollo-link-http ">=1.0.0 <2.0.0" - graphql-typed "^0.4.0" - react-apollo ">=2.2.3 <4.0.0" - -"@shopify/react-html@^8.0.10", "@shopify/react-html@^8.1.3": +"@shopify/react-html@^8.0.10": version "8.1.3" resolved "https://registry.yarnpkg.com/@shopify/react-html/-/react-html-8.1.3.tgz#1cf83190ae7e3a5cb25be5ed2ed73adf36ac0a66" integrity sha512-uExIf1n1BnPNJm04zYRnFQAmFCjW+sOGJ0agkhGAJAN59pyHSEqknuYj4CbzXZbBb1SRS/VO/XWmRdEu697fFA== @@ -1149,25 +1118,6 @@ "@shopify/useful-types" "^1.3.0" tslib "^1.9.3" -"@shopify/react-i18n@^1.8.2": - version "1.10.0" - resolved "https://registry.yarnpkg.com/@shopify/react-i18n/-/react-i18n-1.10.0.tgz#b64232169b4969cf0aa159f201ff7fe56c6ad306" - integrity sha512-KQRkMAXmjnG026YZXYDMsrTxMXj7E8IXSAXyyNuEx6Y1/zHDpyid/ceDneEhF2PMDyVcg6Iprv1lPnvKJN30nQ== - dependencies: - "@shopify/dates" "^0.2.0" - "@shopify/decorators" "^1.1.5" - "@shopify/function-enhancers" "^1.0.5" - "@shopify/i18n" "^0.1.6" - "@shopify/react-effect" "^3.2.3" - "@shopify/react-hooks" "^1.2.3" - "@shopify/useful-types" "^2.0.1" - "@types/hoist-non-react-statics" "^3.0.1" - glob "^7.1.4" - hoist-non-react-statics "^3.0.1" - prop-types "^15.6.2" - string-hash "^1.1.3" - tslib "^1.9.3" - "@shopify/react-import-remote@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@shopify/react-import-remote/-/react-import-remote-0.7.0.tgz#148e322c95b9224afa66c10d9d84f0e8c21860d6" @@ -1346,11 +1296,6 @@ "@types/express-serve-static-core" "*" "@types/serve-static" "*" -"@types/faker@4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/faker/-/faker-4.1.5.tgz#8f620f9c9a67150aa0a32b4e8a407da43fca61d4" - integrity sha512-YSDqoBEWYGdNk53xSkkb6REaUaVSlIjxIAGjj/nbLzlZOit7kUU+nA2zC2qQkIVO4MQ+3zl4Sz7aw+kbpHHHUQ== - "@types/faker@^4.1.5": version "4.1.6" resolved "https://registry.yarnpkg.com/@types/faker/-/faker-4.1.6.tgz#e931064b1d50333044c28668c13033334cf67c71" @@ -8981,7 +8926,7 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -"react-apollo@>=2.2.3 <4.0.0", "react-apollo@>=3.0.0 <4.0.0", react-apollo@^3.1.2: +"react-apollo@>=3.0.0 <4.0.0", react-apollo@^3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/react-apollo/-/react-apollo-3.1.3.tgz#5d8540b401bba36173b63e6c5e75fa561960c63e" integrity sha512-orCZNoAkgveaK5b75y7fw1MSqSHOU/Wuu9rRFOGmRQBSQVZjvV4DI+hj604rHmuN9+WDABxb5W48wTa0F/xNZQ==