From eb27474a714eeddbd2fe84b4d180f6aff5bc3e67 Mon Sep 17 00:00:00 2001 From: Erik Marks <25517051+rekmarks@users.noreply.github.com> Date: Sat, 14 May 2022 10:51:54 -0700 Subject: [PATCH] Fix monorepo build pipeline (#449) --- .gitignore | 2 +- README.md | 19 +++++++++++-- package.json | 11 +++++--- packages/cli/package.json | 2 +- packages/cli/tsconfig.json | 11 ++++---- packages/controllers/jest.config.js | 2 +- packages/controllers/package.json | 2 +- packages/controllers/tsconfig.json | 8 ++---- .../examples/notifications/package.json | 2 +- .../execution-environments/jest.config.js | 6 ++-- packages/execution-environments/package.json | 2 +- packages/execution-environments/tsconfig.json | 9 ++---- packages/plugin-browserify/package.json | 4 +-- .../plugin-browserify/tsconfig.build.json | 4 --- packages/plugin-browserify/tsconfig.json | 4 +-- .../plugin-browserify/tsconfig.local.json | 6 ++++ packages/plugin-rollup/package.json | 4 +-- packages/plugin-rollup/tsconfig.build.json | 4 --- packages/plugin-rollup/tsconfig.json | 4 +-- packages/plugin-rollup/tsconfig.local.json | 6 ++++ packages/plugin-webpack/package.json | 4 +-- packages/plugin-webpack/tsconfig.build.json | 4 --- packages/plugin-webpack/tsconfig.json | 4 +-- packages/plugin-webpack/tsconfig.local.json | 6 ++++ packages/rpc-methods/package.json | 2 +- packages/rpc-methods/tsconfig.json | 9 +++--- packages/utils/package.json | 4 +-- packages/utils/tsconfig.build.json | 4 --- packages/utils/tsconfig.json | 1 - packages/utils/tsconfig.local.json | 6 ++++ scripts/verify-tsconfig.mjs | 28 +++++++++++++++++++ tsconfig.json | 16 +++++------ tsconfig.packages.json | 7 +++-- 33 files changed, 128 insertions(+), 79 deletions(-) delete mode 100644 packages/plugin-browserify/tsconfig.build.json create mode 100644 packages/plugin-browserify/tsconfig.local.json delete mode 100644 packages/plugin-rollup/tsconfig.build.json create mode 100644 packages/plugin-rollup/tsconfig.local.json delete mode 100644 packages/plugin-webpack/tsconfig.build.json create mode 100644 packages/plugin-webpack/tsconfig.local.json delete mode 100644 packages/utils/tsconfig.build.json create mode 100644 packages/utils/tsconfig.local.json create mode 100644 scripts/verify-tsconfig.mjs diff --git a/.gitignore b/.gitignore index 777c24c7e2..f412aa6465 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ **/dist -**/*__GENERATED* +**/*__GENERATED__* # sed backup files *.*-e diff --git a/README.md b/README.md index c9f45d5d4c..ac1fbc756f 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,26 @@ This is currently the only way to use `@lavamoat/allow-scripts` in monorepos. ### Building -For local development, you should run `yarn build:clean` in the project root directory. -This will always build the packages in the correct order. +Run `yarn build` to build all packages in correct order. +If you encounter any errors, try `yarn build:clean`, and if that fails, check the TypeScript configuration (see below). -You can also run `yarn build` in a workspace, although you have to ensure that the projects are built in the correct order. +You can also run `yarn build` in a specific package / workspace, although you have to ensure that its dependencies have been built. Repository-wide watching is currently not possible due to the build processes of some packages. +#### Configuring TypeScript + +The TypeScript configuration of this monorepo is brittle, and requires manual maintenance. +It uses TypeScript [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) and `composite` sub-projects (i.e. monorepo package). +In short, the [root `tsconfig.json`](./tsconfig.json) must contain an empty `files` array, and `references` to each interdependent project with a `tsconfig.json` in its root directory. +Meanwhile, every sub-project must explicitly declare the relative paths to its local dependencies via its `references` array. + +If building from the monorepo root suddenly starts to fail, check if the errors are referring to monorepo packages, and verify that their `tsconfig.json` files are configured correctly. + +Some packages do not require a `tsconfig.json` file. +These packages must be explicitly ignored in the [TypeScript config lint script](./scripts/verify-tsconfig.mjs). +If a package is neither referenced nor ignored, linting will fail. + ### Testing and Linting Run `yarn test` and `yarn lint` in the project root directory, or in a workspace. diff --git a/package.json b/package.json index 0d3ccc4957..5adb347040 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,14 @@ "lint:eslint": "eslint . --cache --ext js,ts", "lint:misc": "prettier '**/*.json' '**/*.md' '!**/CHANGELOG.md' '**/*.yml' --ignore-path .gitignore", "lint:changelogs": "yarn workspaces run lint:changelog", - "lint": "yarn lint:eslint && yarn lint:misc --check", - "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", - "build:tsc": "tsc --build --force tsconfig.json", - "build": "yarn workspaces run build:pre-tsc && yarn build:tsc && yarn workspaces run build:post-tsc", + "lint:tsconfig": "node scripts/verify-tsconfig.mjs", + "lint": "yarn lint:tsconfig && yarn lint:eslint && yarn lint:misc --check", + "lint:fix": "yarn lint:tsconfig && yarn lint:eslint --fix && yarn lint:misc --write", + "build": "yarn build:pre-tsc && yarn build:tsc && yarn build:post-tsc", "build:clean": "yarn clean && yarn build", + "build:tsc": "tsc --build", + "build:pre-tsc": "yarn workspaces run build:pre-tsc ", + "build:post-tsc": "yarn workspaces run build:post-tsc", "clean": "yarn workspaces run clean", "test": "yarn workspaces run test", "test:ci": "yarn workspaces run test:ci" diff --git a/packages/cli/package.json b/packages/cli/package.json index ad1db0ee9e..03dc2d1507 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -26,7 +26,7 @@ "build:post-tsc": "yarn build:chmod && yarn build:readme", "build:clean": "yarn clean && yarn build", "build:watch": "tsc-watch --onSuccess 'yarn build:chmod'", - "clean": "rimraf dist/* src/**/*__GENERATED__*", + "clean": "rimraf *.tsbuildinfo dist/* src/**/*__GENERATED__*", "test": "yarn build:init-template && jest", "posttest": "jest-it-up", "test:watch": "yarn test --watch", diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index a382a486d0..39448fdfe6 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -1,13 +1,11 @@ { "extends": "../../tsconfig.packages.json", "compilerOptions": { - "composite": true, - "forceConsistentCasingInFileNames": true, "inlineSources": true, "lib": ["DOM", "ES2020"], - "outDir": "dist", - "rootDir": "src", + "outDir": "./dist", "resolveJsonModule": true, + "rootDir": "./src", "skipLibCheck": false, "typeRoots": [ "../../node_modules/@types", @@ -16,5 +14,8 @@ ] }, "include": ["./src/**/*.ts", "./src/**/*.json"], - "exclude": ["./src/**/*.test.ts"] + "references": [ + { "path": "../controllers" }, + { "path": "../plugin-browserify" } + ] } diff --git a/packages/controllers/jest.config.js b/packages/controllers/jest.config.js index cb3a11b94d..b5be17b4b1 100644 --- a/packages/controllers/jest.config.js +++ b/packages/controllers/jest.config.js @@ -8,7 +8,7 @@ module.exports = { coveragePathIgnorePatterns: ['/node_modules/', '/mocks/', '/test/'], coverageThreshold: { global: { - branches: 66.67, + branches: 64.44, functions: 82.11, lines: 82.17, statements: 82.23, diff --git a/packages/controllers/package.json b/packages/controllers/package.json index 4d606dfe7b..23938d6c98 100644 --- a/packages/controllers/package.json +++ b/packages/controllers/package.json @@ -23,7 +23,7 @@ "build:ajv": "./scripts/build-ajv.sh", "build": "yarn build:pre-tsc && yarn build:tsc", "build:clean": "yarn clean && yarn build", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "lint:eslint": "eslint . --cache --ext js,ts", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path ../../.gitignore", "lint": "yarn lint:eslint && yarn lint:misc --check", diff --git a/packages/controllers/tsconfig.json b/packages/controllers/tsconfig.json index c7f28c7454..5762f798cc 100644 --- a/packages/controllers/tsconfig.json +++ b/packages/controllers/tsconfig.json @@ -1,15 +1,13 @@ { "extends": "../../tsconfig.packages.json", - "references": [{ "path": "../execution-environments" }], "compilerOptions": { "allowJs": true, - "composite": true, "lib": ["DOM", "ES2020"], - "outDir": "dist", + "outDir": "./dist", "resolveJsonModule": true, - "rootDir": "src", + "rootDir": "./src", "typeRoots": ["../../node_modules/@types", "./node_modules/@types"] }, "include": ["./src", "./src/snaps/json-schemas"], - "exclude": ["**/*.test.ts"] + "references": [{ "path": "../execution-environments" }] } diff --git a/packages/examples/examples/notifications/package.json b/packages/examples/examples/notifications/package.json index 14924d54c4..237b930da8 100644 --- a/packages/examples/examples/notifications/package.json +++ b/packages/examples/examples/notifications/package.json @@ -18,7 +18,7 @@ "build:website": "node ./scripts/build-website.js", "build": "mm-snap build", "serve": "mm-snap serve", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "test": "echo 'TODO'", "lint:eslint": "eslint . --cache --ext js,ts", "lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' --ignore-path .gitignore", diff --git a/packages/execution-environments/jest.config.js b/packages/execution-environments/jest.config.js index 3b41959656..ddcc010140 100644 --- a/packages/execution-environments/jest.config.js +++ b/packages/execution-environments/jest.config.js @@ -6,10 +6,10 @@ module.exports = { coverageReporters: ['clover', 'json', 'lcov', 'text', 'json-summary'], coverageThreshold: { global: { - branches: 29.82, + branches: 34.69, functions: 38.89, - lines: 34.87, - statements: 35.47, + lines: 34.62, + statements: 34.98, }, }, moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'], diff --git a/packages/execution-environments/package.json b/packages/execution-environments/package.json index c1b34ea90d..77de5556ee 100644 --- a/packages/execution-environments/package.json +++ b/packages/execution-environments/package.json @@ -23,7 +23,7 @@ "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:changelog": "yarn auto-changelog validate", "lint": "yarn lint:eslint && yarn lint:misc --check", - "clean": "rimraf dist src/__GENERATED__/", + "clean": "rimraf *.tsbuildinfo dist/* src/__GENERATED__/", "build:clean": "yarn clean && yarn build", "build:pre-tsc": "yarn build:typings", "build:post-tsc": "webpack --mode production && concat -o ./dist/webpack/webworker/bundle.js ./dist/webpack/webworker/lockdown.umd.min.js ./dist/webpack/webworker/bundle.js", diff --git a/packages/execution-environments/tsconfig.json b/packages/execution-environments/tsconfig.json index 81dbdf08e3..92ac4c31ab 100644 --- a/packages/execution-environments/tsconfig.json +++ b/packages/execution-environments/tsconfig.json @@ -1,13 +1,10 @@ { "extends": "../../tsconfig.packages.json", "compilerOptions": { - "composite": true, - "outDir": "dist", - "rootDir": "src", - "sourceMap": true, + "outDir": "./dist", + "rootDir": "./src", "typeRoots": ["./node_modules/@types", "../../node_modules/@types"], "resolveJsonModule": true }, - "include": ["./src", "./src/openrpc.json"], - "exclude": ["**/*.test.ts"] + "include": ["./src", "./src/openrpc.json"] } diff --git a/packages/plugin-browserify/package.json b/packages/plugin-browserify/package.json index 647f87f47a..363a66cc6f 100644 --- a/packages/plugin-browserify/package.json +++ b/packages/plugin-browserify/package.json @@ -21,12 +21,12 @@ "lint": "yarn lint:eslint && yarn lint:misc --check", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:changelog": "yarn auto-changelog validate", - "build:tsc": "tsc --project tsconfig.build.json", + "build:tsc": "tsc --project tsconfig.local.json", "build": "yarn build:tsc", "build:pre-tsc": "echo 'N/A'", "build:post-tsc": "echo 'N/A'", "build:clean": "yarn clean && yarn build", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "publish": "../../scripts/publish-package.sh" }, "dependencies": { diff --git a/packages/plugin-browserify/tsconfig.build.json b/packages/plugin-browserify/tsconfig.build.json deleted file mode 100644 index eeccde4cc9..0000000000 --- a/packages/plugin-browserify/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["./src/**/*.test.ts"] -} diff --git a/packages/plugin-browserify/tsconfig.json b/packages/plugin-browserify/tsconfig.json index f16c39a572..53e7432e39 100644 --- a/packages/plugin-browserify/tsconfig.json +++ b/packages/plugin-browserify/tsconfig.json @@ -1,10 +1,10 @@ { "extends": "../../tsconfig.packages.json", "compilerOptions": { - "composite": false, "outDir": "./dist", "rootDir": "./src", "typeRoots": ["./node_modules/@types"] }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../utils" }] } diff --git a/packages/plugin-browserify/tsconfig.local.json b/packages/plugin-browserify/tsconfig.local.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/plugin-browserify/tsconfig.local.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/plugin-rollup/package.json b/packages/plugin-rollup/package.json index b004e42295..42647fb9ed 100644 --- a/packages/plugin-rollup/package.json +++ b/packages/plugin-rollup/package.json @@ -22,12 +22,12 @@ "lint": "yarn lint:eslint && yarn lint:misc --check", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:changelog": "yarn auto-changelog validate", - "build:tsc": "tsc --project tsconfig.build.json", + "build:tsc": "tsc --project tsconfig.local.json", "build": "yarn build:tsc", "build:pre-tsc": "echo 'N/A'", "build:post-tsc": "echo 'N/A'", "build:clean": "yarn clean && yarn build", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "publish": "../../scripts/publish-package.sh" }, "dependencies": { diff --git a/packages/plugin-rollup/tsconfig.build.json b/packages/plugin-rollup/tsconfig.build.json deleted file mode 100644 index 2fc50d9c8b..0000000000 --- a/packages/plugin-rollup/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["./src/**/*.test.ts", "./src/**/__snapshots__/**/*.ts"] -} diff --git a/packages/plugin-rollup/tsconfig.json b/packages/plugin-rollup/tsconfig.json index f16c39a572..53e7432e39 100644 --- a/packages/plugin-rollup/tsconfig.json +++ b/packages/plugin-rollup/tsconfig.json @@ -1,10 +1,10 @@ { "extends": "../../tsconfig.packages.json", "compilerOptions": { - "composite": false, "outDir": "./dist", "rootDir": "./src", "typeRoots": ["./node_modules/@types"] }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../utils" }] } diff --git a/packages/plugin-rollup/tsconfig.local.json b/packages/plugin-rollup/tsconfig.local.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/plugin-rollup/tsconfig.local.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/plugin-webpack/package.json b/packages/plugin-webpack/package.json index b08fdfcd5b..b50c65a8b1 100644 --- a/packages/plugin-webpack/package.json +++ b/packages/plugin-webpack/package.json @@ -22,12 +22,12 @@ "lint": "yarn lint:eslint && yarn lint:misc --check", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:changelog": "yarn auto-changelog validate", - "build:tsc": "tsc --project tsconfig.build.json", + "build:tsc": "tsc --project tsconfig.local.json", "build": "yarn build:tsc", "build:pre-tsc": "echo 'N/A'", "build:post-tsc": "echo 'N/A'", "build:clean": "yarn clean && yarn build", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "publish": "../../scripts/publish-package.sh" }, "dependencies": { diff --git a/packages/plugin-webpack/tsconfig.build.json b/packages/plugin-webpack/tsconfig.build.json deleted file mode 100644 index 2fc50d9c8b..0000000000 --- a/packages/plugin-webpack/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["./src/**/*.test.ts", "./src/**/__snapshots__/**/*.ts"] -} diff --git a/packages/plugin-webpack/tsconfig.json b/packages/plugin-webpack/tsconfig.json index f16c39a572..53e7432e39 100644 --- a/packages/plugin-webpack/tsconfig.json +++ b/packages/plugin-webpack/tsconfig.json @@ -1,10 +1,10 @@ { "extends": "../../tsconfig.packages.json", "compilerOptions": { - "composite": false, "outDir": "./dist", "rootDir": "./src", "typeRoots": ["./node_modules/@types"] }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../utils" }] } diff --git a/packages/plugin-webpack/tsconfig.local.json b/packages/plugin-webpack/tsconfig.local.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/plugin-webpack/tsconfig.local.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/packages/rpc-methods/package.json b/packages/rpc-methods/package.json index 875ba6121a..d49ee6aaf5 100644 --- a/packages/rpc-methods/package.json +++ b/packages/rpc-methods/package.json @@ -23,7 +23,7 @@ "build:post-tsc": "echo 'N/A'", "build": "tsc --project tsconfig.local.json", "build:clean": "yarn clean && yarn build", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "publish": "../../scripts/publish-package.sh" }, "dependencies": { diff --git a/packages/rpc-methods/tsconfig.json b/packages/rpc-methods/tsconfig.json index 02d8281d61..53f4bb69f2 100644 --- a/packages/rpc-methods/tsconfig.json +++ b/packages/rpc-methods/tsconfig.json @@ -1,11 +1,10 @@ { "extends": "../../tsconfig.packages.json", - "references": [{ "path": "../controllers" }], "compilerOptions": { - "composite": true, - "outDir": "dist", - "rootDir": "src", + "outDir": "./dist", + "rootDir": "./src", "typeRoots": ["../../node_modules/@types", "./types"] }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../controllers" }] } diff --git a/packages/utils/package.json b/packages/utils/package.json index d009c1ddbc..0e417f4165 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -18,12 +18,12 @@ "lint": "yarn lint:eslint && yarn lint:misc --check", "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write", "lint:changelog": "yarn auto-changelog validate", - "build:tsc": "tsc --project tsconfig.build.json", + "build:tsc": "tsc --project tsconfig.local.json", "build": "yarn build:tsc", "build:pre-tsc": "echo 'N/A'", "build:post-tsc": "echo 'N/A'", "build:clean": "yarn clean && yarn build", - "clean": "rimraf dist/*", + "clean": "rimraf *.tsbuildinfo dist/*", "publish": "../../scripts/publish-package.sh" }, "dependencies": { diff --git a/packages/utils/tsconfig.build.json b/packages/utils/tsconfig.build.json deleted file mode 100644 index eeccde4cc9..0000000000 --- a/packages/utils/tsconfig.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["./src/**/*.test.ts"] -} diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index f16c39a572..fa1a1aae57 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.packages.json", "compilerOptions": { - "composite": false, "outDir": "./dist", "rootDir": "./src", "typeRoots": ["./node_modules/@types"] diff --git a/packages/utils/tsconfig.local.json b/packages/utils/tsconfig.local.json new file mode 100644 index 0000000000..80b6a0a846 --- /dev/null +++ b/packages/utils/tsconfig.local.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "composite": false + } +} diff --git a/scripts/verify-tsconfig.mjs b/scripts/verify-tsconfig.mjs new file mode 100644 index 0000000000..e359c81722 --- /dev/null +++ b/scripts/verify-tsconfig.mjs @@ -0,0 +1,28 @@ +import { promises as fs } from 'fs'; +import pathUtils from 'path'; +import { fileURLToPath } from 'url'; + +const cwd = pathUtils.dirname(fileURLToPath(import.meta.url)) + +// These are the packages we expect to _not_ be referenced in the root tsconfig. +const IGNORE_LIST = new Set(['examples', 'types']); + +// Get reference paths from root tsconfig.json +const rootTsconfig = JSON.parse(await fs.readFile('./tsconfig.json', { encoding: 'utf8'})); +const rootTsconfigReferences = new Set(rootTsconfig.references.map( + ({ path }) => path.split('/').pop() +)) + +// Get the names of all directories in the packages directory +const packagesPath = pathUtils.resolve(cwd, '../packages'); +const packageDirNames = (await fs.readdir(packagesPath, { withFileTypes: true })) + .filter((dirent) => dirent.isDirectory()) + .map((dirent) => dirent.name); + +// Any unreferenced package dirs must either be referenced or ignored +const unreferencedPackageDirs = packageDirNames.filter((name) => !rootTsconfigReferences.has(name) && !IGNORE_LIST.has(name)) +if (unreferencedPackageDirs.length > 0) { + throw new Error(`Found unreferenced package directories not in ignore list:\n\n\t${ + unreferencedPackageDirs.join('\n\t') + }\n\nEither reference or ignore the packages to continue.`) +} diff --git a/tsconfig.json b/tsconfig.json index 32e43a7b56..f82a073f7a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,13 @@ { + "files": [], "references": [ - { "path": "./packages/utils/tsconfig.build.json" }, - { "path": "./packages/plugin-browserify/tsconfig.build.json" }, + { "path": "./packages/cli" }, { "path": "./packages/controllers" }, + { "path": "./packages/execution-environments" }, + { "path": "./packages/plugin-browserify" }, + { "path": "./packages/plugin-rollup" }, + { "path": "./packages/plugin-webpack" }, { "path": "./packages/rpc-methods" }, - { "path": "./packages/cli" }, - { "path": "./packages/execution-environments" } - ], - "files": [], - "include": [], - "exclude": ["**/node_modules"] + { "path": "./packages/utils" } + ] } diff --git a/tsconfig.packages.json b/tsconfig.packages.json index 9343d71a4c..cfee34b25b 100644 --- a/tsconfig.packages.json +++ b/tsconfig.packages.json @@ -1,13 +1,16 @@ { "compilerOptions": { + "composite": true, "declaration": true, "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, "module": "CommonJS", "moduleResolution": "node", "useUnknownInCatchVariables": false, "sourceMap": true, "strict": true, - "target": "ES2017", + "target": "ES2020", "typeRoots": ["./node_modules/@types"] - } + }, + "exclude": ["**/*.test.ts", "**/__snapshots__/**/*.ts"] }