diff --git a/.changeset/famous-suns-run.md b/.changeset/famous-suns-run.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/famous-suns-run.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.monorepolint.config.mjs b/.monorepolint.config.mjs index 6cdbad01a..67c6c3765 100644 --- a/.monorepolint.config.mjs +++ b/.monorepolint.config.mjs @@ -32,18 +32,33 @@ import * as child_process from "node:child_process"; const LATEST_TYPESCRIPT_DEP = "^5.5.2"; const DELETE_SCRIPT_ENTRY = { options: [undefined], fixValue: undefined }; + +// +// BEGIN MUTUALLY EXCLUSIVE GROUPS +// + +// Packages in this section MUST only belong to one (or none) of these +// three groups: +// - nonStandardPackages +// - legacyPackages +// - esmOnlyPackages +// +// Packages in none of these groups are treated as esm + cjs +// but not legacy + const nonStandardPackages = [ + "@osdk/e2e.generated.1.1.x", + "@osdk/e2e.sandbox.todoapp", "@osdk/examples.*", "@osdk/foundry-sdk-generator", "@osdk/monorepo.*", // internal monorepo packages - "@osdk/e2e.sandbox.*", // sandboxes for manual e2e testing - "@osdk/e2e.generated.*", // generated sdks for e2e testing "@osdk/shared.client", // hand written package that only exposes a symbol - "@osdk/create-app.template.*", // template packages for create-app "@osdk/tests.*", ]; -// Any package that is in the dependency chain of `legacy-client` needs to be in this list +// Any package that is in the dependency chain of `legacy-client` needs to be in this list so +// that we are sure to generate them in a backwards compatible way. This can be changed +// at next major. const legacyPackages = [ "@osdk/api", "@osdk/gateway", @@ -58,8 +73,10 @@ const esmOnlyPackages = [ "@osdk/cli", "@osdk/client.*", "@osdk/client", - "@osdk/create-app.template-packager", + "@osdk/create-app.*", "@osdk/create-app", + "@osdk/e2e.generated.catchall", + "@osdk/e2e.sandbox.catchall", "@osdk/example-generator", "@osdk/foundry.*", "@osdk/foundry", @@ -75,11 +92,24 @@ const esmOnlyPackages = [ // "@osdk/examples.*", but they have their own config cause they are nonstandard ]; +// +// END MUTUALLY EXCLUSIVE GROUPS +// + +// Packages that should have the `check-api` task installed const checkApiPackages = [ "@osdk/client", "@osdk/client.api", ]; +// Packages that should be private +const privatePackages = [ + "@osdk/client.test.ontology", + "@osdk/e2e.*", + "@osdk/monorepo.*", + "@osdk/tool.*", +]; + /** * We don't want to allow `workspace:^` in our dependencies because our current release branch * strategy only allows for patch changes in the release branch and minors elsewhere. @@ -210,8 +240,6 @@ function getTsconfigOptions(baseTsconfigPath, opts) { * @param {{ * legacy: boolean, * esmOnly?: boolean, - * packageDepth: number, - * type: "library" | "example", * customTsconfigExcludes?: string[], * tsVersion?: "^5.5.2"|"^4.9.5", * skipTsconfigReferences?: boolean @@ -228,9 +256,6 @@ function standardPackageRules(shared, options) { throw "singlePackageName only makes sense for legacy packages"; } - const pathToWorkspaceRoot = "../".repeat(options.packageDepth) - .slice(0, -1); // drop trailing slash - return [ disallowWorkspaceCaret({ ...shared }), @@ -291,19 +316,16 @@ function standardPackageRules(shared, options) { scripts: { clean: "rm -rf lib dist types build tsconfig.tsbuildinfo", "check-spelling": "cspell --quiet .", - "check-attw": - `${pathToWorkspaceRoot}/scripts/build_common/check-attw.sh ${ - options.esmOnly ? "esm" : "both" - }`, + "check-attw": `monorepo.tool.attw ${ + options.esmOnly ? "esm" : "both" + }`, lint: "eslint . && dprint check --config $(find-up dprint.json)", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", - transpile: - "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - typecheck: - `find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ${pathToWorkspaceRoot}/scripts/build_common/typecheck.sh ${ - options.esmOnly ? "esm" : "both" - }`, + transpile: "monorepo.tool.transpile", + typecheck: `monorepo.tool.typecheck ${ + options.esmOnly ? "esm" : "both" + }`, }, }, }), @@ -432,14 +454,8 @@ NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. `, }, }), - ...standardPackageRules({ - includePackages: ["@osdk/create-app.template.*"], - }, { - legacy: false, - packageDepth: 2, - type: "example", - esmOnly: true, - }), + + // Fall through case for none of the mutual exclusive groups ...standardPackageRules({ excludePackages: [ ...nonStandardPackages, @@ -448,8 +464,6 @@ NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. ], }, { legacy: false, - packageDepth: 2, - type: "library", tsVersion: LATEST_TYPESCRIPT_DEP, }), @@ -458,8 +472,6 @@ NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. }, { legacy: false, esmOnly: true, - packageDepth: 2, - type: "library", tsVersion: LATEST_TYPESCRIPT_DEP, }), @@ -467,8 +479,6 @@ NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. includePackages: ["@osdk/foundry-sdk-generator"], }, { legacy: false, - packageDepth: 2, - type: "library", tsVersion: LATEST_TYPESCRIPT_DEP, esmOnly: true, customTsconfigExcludes: [ @@ -483,35 +493,18 @@ NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. includePackages: [pkg], }, { legacy: true, - packageDepth: 2, - type: "library", tsVersion: LATEST_TYPESCRIPT_DEP, singlePackageName: pkg, }) ) ), - ...standardPackageRules({ - includePackages: [ - "@osdk/e2e.generated.catchall", - "@osdk/e2e.sandbox.catchall", - ], - excludePackages: ["@osdk/e2e.generated.1.1.x"], - }, { - esmOnly: true, - legacy: false, - packageDepth: 2, - type: "example", - }), - // most packages can use the newest typescript, but we enforce that @osdk/example.one.dot.one uses TS4.9 // so that we get build-time checking to make sure we don't regress v1.1 clients using an older Typescript. ...standardPackageRules({ includePackages: ["@osdk/e2e.generated.1.1.x"], }, { legacy: false, - packageDepth: 2, - type: "example", tsVersion: "^4.9.5", skipTsconfigReferences: true, }), @@ -571,6 +564,15 @@ package you do so at your own risk. }, }), + packageEntry({ + includePackages: privatePackages, + options: { + entries: { + private: true, + }, + }, + }), + alphabeticalDependencies({ includeWorkspaceRoot: true }), alphabeticalScripts({ includeWorkspaceRoot: true }), diff --git a/package.json b/package.json index 751309a9c..6c8ccdcaf 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,9 @@ "@monorepolint/core": "0.5.0-beta.10", "@monorepolint/rules": "0.5.0-beta.10", "@osdk/monorepo.cspell": "workspace:~", + "@osdk/monorepo.tool.attw": "workspace:~", + "@osdk/monorepo.tool.transpile": "workspace:~", + "@osdk/monorepo.tool.typecheck": "workspace:~", "@osdk/monorepo.tsconfig": "workspace:~", "@osdk/monorepo.tsup": "workspace:~", "@types/lint-staged": "^13.3.0", diff --git a/packages/api/package.json b/packages/api/package.json index bc7d71709..f12eb3b04 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -21,16 +21,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/gateway": "workspace:~", diff --git a/packages/cli.cmd.typescript/package.json b/packages/cli.cmd.typescript/package.json index 4b62d2cd8..415197a02 100644 --- a/packages/cli.cmd.typescript/package.json +++ b/packages/cli.cmd.typescript/package.json @@ -18,13 +18,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@arethetypeswrong/cli": "^0.15.2", diff --git a/packages/cli.common/package.json b/packages/cli.common/package.json index 3b75ca69e..651c37aba 100644 --- a/packages/cli.common/package.json +++ b/packages/cli.common/package.json @@ -18,13 +18,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "consola": "^3.2.3", diff --git a/packages/cli/package.json b/packages/cli/package.json index d163af957..863642f28 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -19,16 +19,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@arethetypeswrong/cli": "^0.15.2", diff --git a/packages/client.api/package.json b/packages/client.api/package.json index e4c4534b8..7189336cb 100644 --- a/packages/client.api/package.json +++ b/packages/client.api/package.json @@ -19,13 +19,13 @@ "scripts": { "api-docs": "api-documenter markdown -i build/api-extractor --output-folder api-docs", "check-api": "api-extractor run --verbose --local", - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~" diff --git a/packages/client.test.ontology/package.json b/packages/client.test.ontology/package.json index b5545283d..c5d188d5e 100644 --- a/packages/client.test.ontology/package.json +++ b/packages/client.test.ontology/package.json @@ -18,14 +18,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "node ./generateMockOntology.js", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/client.api": "workspace:*" diff --git a/packages/client.unstable.osw/package.json b/packages/client.unstable.osw/package.json index b8930fb2e..51c21d0b9 100644 --- a/packages/client.unstable.osw/package.json +++ b/packages/client.unstable.osw/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "conjure-lite": "^0.4.4" diff --git a/packages/client.unstable/package.json b/packages/client.unstable/package.json index 8be8ca3a5..516f29306 100644 --- a/packages/client.unstable/package.json +++ b/packages/client.unstable/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "conjure-lite": "^0.4.4" diff --git a/packages/client/package.json b/packages/client/package.json index b2b9bfc51..73e8aceb1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -20,16 +20,16 @@ }, "scripts": { "check-api": "api-extractor run --verbose --local", - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/create-app.template-packager/package.json b/packages/create-app.template-packager/package.json index 683b0baf7..c97f0eb07 100644 --- a/packages/create-app.template-packager/package.json +++ b/packages/create-app.template-packager/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "consola": "^3.2.3", diff --git a/packages/create-app.template.next-static-export/package.json b/packages/create-app.template.next-static-export/package.json index 0c5f5fcc3..9f9ba5017 100644 --- a/packages/create-app.template.next-static-export/package.json +++ b/packages/create-app.template.next-static-export/package.json @@ -17,14 +17,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "create-app.template-packager", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "next": "14.2.3", @@ -41,7 +41,7 @@ "@types/react-dom": "^18", "eslint": "^8.57.0", "eslint-config-next": "^14.2.3", - "typescript": "^5" + "typescript": "^5.5.2" }, "publishConfig": { "access": "public" diff --git a/packages/create-app.template.react/package.json b/packages/create-app.template.react/package.json index 9887b3e0e..b4d1d049e 100644 --- a/packages/create-app.template.react/package.json +++ b/packages/create-app.template.react/package.json @@ -17,14 +17,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "create-app.template-packager", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "react": "^18", @@ -44,7 +44,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.6", - "typescript": "^5.2.2", + "typescript": "^5.5.2", "vite": "^5.3.4" }, "publishConfig": { diff --git a/packages/create-app.template.tutorial-todo-aip-app/package.json b/packages/create-app.template.tutorial-todo-aip-app/package.json index bde993121..1fc6fe254 100644 --- a/packages/create-app.template.tutorial-todo-aip-app/package.json +++ b/packages/create-app.template.tutorial-todo-aip-app/package.json @@ -17,14 +17,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "create-app.template-packager", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "react": "^18", @@ -45,7 +45,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.6", - "typescript": "^5.2.2", + "typescript": "^5.5.2", "vite": "^5.3.4" }, "publishConfig": { diff --git a/packages/create-app.template.tutorial-todo-app/package.json b/packages/create-app.template.tutorial-todo-app/package.json index 5d2c8b32d..a14b779b6 100644 --- a/packages/create-app.template.tutorial-todo-app/package.json +++ b/packages/create-app.template.tutorial-todo-app/package.json @@ -17,14 +17,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "create-app.template-packager", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "react": "^18", @@ -45,7 +45,7 @@ "eslint": "^8.57.0", "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-react-refresh": "^0.4.6", - "typescript": "^5.2.2", + "typescript": "^5.5.2", "vite": "^5.3.4" }, "publishConfig": { diff --git a/packages/create-app.template.vue/package.json b/packages/create-app.template.vue/package.json index 287339439..26bd05b09 100644 --- a/packages/create-app.template.vue/package.json +++ b/packages/create-app.template.vue/package.json @@ -17,14 +17,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "create-app.template-packager", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "vue": "^3.4.27", @@ -36,7 +36,7 @@ "@osdk/monorepo.tsconfig": "workspace:~", "@osdk/monorepo.tsup": "workspace:~", "@vitejs/plugin-vue": "^4.5.0", - "typescript": "^5.2.2", + "typescript": "^5.5.2", "vite": "^5.3.4", "vue-tsc": "^1.8.22" }, diff --git a/packages/create-app/package.json b/packages/create-app/package.json index 0a481dfd9..ec1dc866d 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -19,16 +19,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/create-app.template.next-static-export": "workspace:*", diff --git a/packages/e2e.generated.1.1.x/package.json b/packages/e2e.generated.1.1.x/package.json index 39dcf7e5e..64ac8d2e8 100644 --- a/packages/e2e.generated.1.1.x/package.json +++ b/packages/e2e.generated.1.1.x/package.json @@ -21,15 +21,15 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "rm -rf src/generatedNoCheck/* && osdk-unstable-typescript generate --outDir src/generatedNoCheck --ontologyPath ontology.json --version dev --packageType module", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/e2e.generated.catchall/package.json b/packages/e2e.generated.catchall/package.json index e59e457cc..e8026774f 100644 --- a/packages/e2e.generated.catchall/package.json +++ b/packages/e2e.generated.catchall/package.json @@ -19,15 +19,15 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "rm -rf src/generatedNoCheck/* && osdk-unstable-typescript generate --outDir src/generatedNoCheck --ontologyPath ontology.json --beta true --packageType module --version dev --internal", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", @@ -47,7 +47,7 @@ "@osdk/monorepo.tsconfig": "workspace:~", "@osdk/monorepo.tsup": "workspace:~", "tslib": "^2.6.2", - "typescript": "^5.4.5" + "typescript": "^5.5.2" }, "publishConfig": { "access": "public" diff --git a/packages/e2e.sandbox.catchall/package.json b/packages/e2e.sandbox.catchall/package.json index 97d068064..c94a96e6a 100644 --- a/packages/e2e.sandbox.catchall/package.json +++ b/packages/e2e.sandbox.catchall/package.json @@ -18,14 +18,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", @@ -45,7 +45,8 @@ "@osdk/monorepo.tsconfig": "workspace:~", "@osdk/monorepo.tsup": "workspace:~", "@types/node": "^18.0.0", - "ts-expect": "^1.3.0" + "ts-expect": "^1.3.0", + "typescript": "^5.5.2" }, "publishConfig": { "access": "public" diff --git a/packages/example-generator/package.json b/packages/example-generator/package.json index fa097aef3..bee6101b8 100644 --- a/packages/example-generator/package.json +++ b/packages/example-generator/package.json @@ -19,14 +19,14 @@ }, "scripts": { "check": "./bin/exampleGenerator.mjs ../../examples --check", - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "generate": "./bin/exampleGenerator.mjs ../../examples", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/create-app": "workspace:~", diff --git a/packages/foundry-sdk-generator/package.json b/packages/foundry-sdk-generator/package.json index 9500c09a0..7ae901a71 100644 --- a/packages/foundry-sdk-generator/package.json +++ b/packages/foundry-sdk-generator/package.json @@ -19,16 +19,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --config ./vitest.config.mts --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/foundry.core/package.json b/packages/foundry.core/package.json index ad7d1b469..27b8ee45e 100644 --- a/packages/foundry.core/package.json +++ b/packages/foundry.core/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/shared.client": "workspace:~", diff --git a/packages/foundry.security/package.json b/packages/foundry.security/package.json index 63052a59d..c84142b77 100644 --- a/packages/foundry.security/package.json +++ b/packages/foundry.security/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/foundry.core": "workspace:*", diff --git a/packages/foundry.thirdpartyapplications/package.json b/packages/foundry.thirdpartyapplications/package.json index fbf30ae67..168bc80e6 100644 --- a/packages/foundry.thirdpartyapplications/package.json +++ b/packages/foundry.thirdpartyapplications/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/foundry.core": "workspace:*", diff --git a/packages/foundry/package.json b/packages/foundry/package.json index 9617502e6..32eabb7e8 100644 --- a/packages/foundry/package.json +++ b/packages/foundry/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/foundry.core": "workspace:*", diff --git a/packages/gateway-generator/package.json b/packages/gateway-generator/package.json index d6cfb8d90..8fac8b7ea 100644 --- a/packages/gateway-generator/package.json +++ b/packages/gateway-generator/package.json @@ -20,16 +20,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "find-up": "^7.0.0", diff --git a/packages/gateway/package.json b/packages/gateway/package.json index 808fd8590..8f63d8a5c 100644 --- a/packages/gateway/package.json +++ b/packages/gateway/package.json @@ -21,14 +21,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "fetch-retry": "^6.0.0", diff --git a/packages/generator-converters/package.json b/packages/generator-converters/package.json index 744881630..08827f5a9 100644 --- a/packages/generator-converters/package.json +++ b/packages/generator-converters/package.json @@ -21,16 +21,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/generator/package.json b/packages/generator/package.json index f02230935..5e183378b 100644 --- a/packages/generator/package.json +++ b/packages/generator/package.json @@ -21,16 +21,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/internal.foundry.core/package.json b/packages/internal.foundry.core/package.json index b172ceb3a..23c37108c 100644 --- a/packages/internal.foundry.core/package.json +++ b/packages/internal.foundry.core/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/internal.foundry.datasets/package.json b/packages/internal.foundry.datasets/package.json index db94bddf6..41c0644c0 100644 --- a/packages/internal.foundry.datasets/package.json +++ b/packages/internal.foundry.datasets/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/internal.foundry.models/package.json b/packages/internal.foundry.models/package.json index fb4e00886..62ee4b859 100644 --- a/packages/internal.foundry.models/package.json +++ b/packages/internal.foundry.models/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/internal.foundry.ontologies/package.json b/packages/internal.foundry.ontologies/package.json index b847e461e..1dc739635 100644 --- a/packages/internal.foundry.ontologies/package.json +++ b/packages/internal.foundry.ontologies/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/internal.foundry.ontologiesv2/package.json b/packages/internal.foundry.ontologiesv2/package.json index 761c6af4c..5230f0618 100644 --- a/packages/internal.foundry.ontologiesv2/package.json +++ b/packages/internal.foundry.ontologiesv2/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/internal.foundry/package.json b/packages/internal.foundry/package.json index 981e7d237..db39c0000 100644 --- a/packages/internal.foundry/package.json +++ b/packages/internal.foundry/package.json @@ -18,13 +18,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/legacy-client/package.json b/packages/legacy-client/package.json index c72ceb97c..f63ee0500 100644 --- a/packages/legacy-client/package.json +++ b/packages/legacy-client/package.json @@ -21,7 +21,7 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "codegen": "node ./generateMockOntology.mjs", @@ -29,9 +29,9 @@ "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/maker/package.json b/packages/maker/package.json index 66ba3b3f7..af9f8eabe 100644 --- a/packages/maker/package.json +++ b/packages/maker/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/monorepo.api-extractor/package.json b/packages/monorepo.api-extractor/package.json index ff7de31e4..401c342eb 100644 --- a/packages/monorepo.api-extractor/package.json +++ b/packages/monorepo.api-extractor/package.json @@ -1,5 +1,6 @@ { "name": "@osdk/monorepo.api-extractor", + "private": true, "version": "0.0.0", "license": "Apache-2.0", "repository": { diff --git a/scripts/build_common/check-attw.sh b/packages/monorepo.tool.attw/bin/check-attw.sh similarity index 100% rename from scripts/build_common/check-attw.sh rename to packages/monorepo.tool.attw/bin/check-attw.sh diff --git a/packages/monorepo.tool.attw/package.json b/packages/monorepo.tool.attw/package.json new file mode 100644 index 000000000..079c930c5 --- /dev/null +++ b/packages/monorepo.tool.attw/package.json @@ -0,0 +1,11 @@ +{ + "name": "@osdk/monorepo.tool.attw", + "private": true, + "version": "0.0.0", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "bin": "./bin/check-attw.sh" +} diff --git a/packages/monorepo.tool.transpile/bin/transpile.sh b/packages/monorepo.tool.transpile/bin/transpile.sh new file mode 100755 index 000000000..72b7b4b2e --- /dev/null +++ b/packages/monorepo.tool.transpile/bin/transpile.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +find . \( -path build/cjs -or -path build/esm -or -path build/browser \) -type f \( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \) -delete \ + && pnpm exec tsup \ No newline at end of file diff --git a/packages/monorepo.tool.transpile/package.json b/packages/monorepo.tool.transpile/package.json new file mode 100644 index 000000000..8c91a31d9 --- /dev/null +++ b/packages/monorepo.tool.transpile/package.json @@ -0,0 +1,11 @@ +{ + "name": "@osdk/monorepo.tool.transpile", + "private": true, + "version": "0.0.0", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "bin": "./bin/transpile.sh" +} diff --git a/scripts/build_common/typecheck.sh b/packages/monorepo.tool.typecheck/bin/typecheck.sh similarity index 79% rename from scripts/build_common/typecheck.sh rename to packages/monorepo.tool.typecheck/bin/typecheck.sh index 4b5b7d6db..0274a34d1 100755 --- a/scripts/build_common/typecheck.sh +++ b/packages/monorepo.tool.typecheck/bin/typecheck.sh @@ -3,7 +3,9 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -# shellcheck source-path=SCRIPTDIR/../ +# Clean up old files +find . \( -path build/cjs -or -path build/esm -or -path build/browser \) -type f \( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \) -delete + # Command line arg BUILD_TYPE="${1:-esm}" @@ -13,7 +15,7 @@ if [[ "$BUILD_TYPE" != "esm" && "$BUILD_TYPE" != "both" ]]; then exit 1 fi -source "$SCRIPT_DIR/../checkCommand.sh" +source "$SCRIPT_DIR/../../../scripts/checkCommand.sh" SED="$(checkCommand "gsed" "sed" "Try 'brew install gnu-sed'")" TSC="pnpm exec tsc-absolute" diff --git a/packages/monorepo.tool.typecheck/package.json b/packages/monorepo.tool.typecheck/package.json new file mode 100644 index 000000000..6859a178b --- /dev/null +++ b/packages/monorepo.tool.typecheck/package.json @@ -0,0 +1,11 @@ +{ + "name": "@osdk/monorepo.tool.typecheck", + "private": true, + "version": "0.0.0", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "bin": "./bin/typecheck.sh" +} diff --git a/packages/oauth/package.json b/packages/oauth/package.json index 25a9cae07..c850c02bd 100644 --- a/packages/oauth/package.json +++ b/packages/oauth/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "delay": "^6.0.0", diff --git a/packages/platform-sdk-generator/package.json b/packages/platform-sdk-generator/package.json index d60f180d4..385408dfc 100644 --- a/packages/platform-sdk-generator/package.json +++ b/packages/platform-sdk-generator/package.json @@ -18,13 +18,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "find-up": "^7.0.0", diff --git a/packages/shared.client.impl/package.json b/packages/shared.client.impl/package.json index fd503df7b..8a26e4015 100644 --- a/packages/shared.client.impl/package.json +++ b/packages/shared.client.impl/package.json @@ -19,13 +19,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/shared.client": "workspace:~", diff --git a/packages/shared.client/package.json b/packages/shared.client/package.json index 9b9b9cb69..89c0746e8 100644 --- a/packages/shared.client/package.json +++ b/packages/shared.client/package.json @@ -13,7 +13,7 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)" diff --git a/packages/shared.net.errors/package.json b/packages/shared.net.errors/package.json index 4bcc73fbe..008628fba 100644 --- a/packages/shared.net.errors/package.json +++ b/packages/shared.net.errors/package.json @@ -19,13 +19,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck both" }, "devDependencies": { "@osdk/monorepo.api-extractor": "workspace:~", diff --git a/packages/shared.net.fetch/package.json b/packages/shared.net.fetch/package.json index f729fde38..714d6b318 100644 --- a/packages/shared.net.fetch/package.json +++ b/packages/shared.net.fetch/package.json @@ -19,13 +19,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/shared.net.errors": "workspace:~", diff --git a/packages/shared.net.platformapi/package.json b/packages/shared.net.platformapi/package.json index 9c759e40b..900137a94 100644 --- a/packages/shared.net.platformapi/package.json +++ b/packages/shared.net.platformapi/package.json @@ -17,13 +17,13 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@osdk/shared.client": "workspace:~", diff --git a/packages/shared.net/package.json b/packages/shared.net/package.json index a390f8e83..fdae8c583 100644 --- a/packages/shared.net/package.json +++ b/packages/shared.net/package.json @@ -21,16 +21,16 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/gateway": "workspace:~", diff --git a/packages/shared.test/package.json b/packages/shared.test/package.json index e981083c8..321f3807e 100644 --- a/packages/shared.test/package.json +++ b/packages/shared.test/package.json @@ -22,14 +22,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh both", + "check-attw": "monorepo.tool.attw both", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh both" + "typecheck": "monorepo.tool.typecheck both" }, "dependencies": { "@osdk/api": "workspace:~", diff --git a/packages/tool.release/package.json b/packages/tool.release/package.json index ffa6c296f..dfa6b0b50 100644 --- a/packages/tool.release/package.json +++ b/packages/tool.release/package.json @@ -18,14 +18,14 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", "lint": "eslint . && dprint check --config $(find-up dprint.json)", "test": "vitest run --pool=forks", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "transpile": "monorepo.tool.transpile", + "typecheck": "monorepo.tool.typecheck esm" }, "dependencies": { "@actions/exec": "^1.1.1", diff --git a/packages/version-updater/package.json b/packages/version-updater/package.json index 622ff80be..a5b535d65 100644 --- a/packages/version-updater/package.json +++ b/packages/version-updater/package.json @@ -20,7 +20,7 @@ } }, "scripts": { - "check-attw": "../../scripts/build_common/check-attw.sh esm", + "check-attw": "monorepo.tool.attw esm", "check-spelling": "cspell --quiet .", "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", @@ -28,9 +28,9 @@ "postVersioning": "./scripts/postVersioning.mjs", "test": "vitest run --pool=forks", "test:watch": "vitest", - "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "transpile": "monorepo.tool.transpile", "transpileWatch": "tsup --watch", - "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + "typecheck": "monorepo.tool.typecheck esm" }, "devDependencies": { "@osdk/monorepo.api-extractor": "workspace:~", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b475f6829..7c1050402 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,6 +41,15 @@ importers: '@osdk/monorepo.cspell': specifier: workspace:~ version: link:packages/monorepo.cspell + '@osdk/monorepo.tool.attw': + specifier: workspace:~ + version: link:packages/monorepo.tool.attw + '@osdk/monorepo.tool.transpile': + specifier: workspace:~ + version: link:packages/monorepo.tool.transpile + '@osdk/monorepo.tool.typecheck': + specifier: workspace:~ + version: link:packages/monorepo.tool.typecheck '@osdk/monorepo.tsconfig': specifier: workspace:~ version: link:packages/monorepo.tsconfig @@ -939,7 +948,7 @@ importers: specifier: ^14.2.3 version: 14.2.3(eslint@8.57.0)(typescript@5.5.3) typescript: - specifier: ^5 + specifier: ^5.5.2 version: 5.5.3 packages/create-app.template.react: @@ -991,7 +1000,7 @@ importers: specifier: ^0.4.6 version: 0.4.7(eslint@8.57.0) typescript: - specifier: ^5.2.2 + specifier: ^5.5.2 version: 5.5.3 vite: specifier: ^5.3.4 @@ -1049,7 +1058,7 @@ importers: specifier: ^0.4.6 version: 0.4.7(eslint@8.57.0) typescript: - specifier: ^5.2.2 + specifier: ^5.5.2 version: 5.5.3 vite: specifier: ^5.3.4 @@ -1107,7 +1116,7 @@ importers: specifier: ^0.4.6 version: 0.4.7(eslint@8.57.0) typescript: - specifier: ^5.2.2 + specifier: ^5.5.2 version: 5.5.3 vite: specifier: ^5.3.4 @@ -1138,7 +1147,7 @@ importers: specifier: ^4.5.0 version: 4.6.2(vite@5.3.4)(vue@3.4.27) typescript: - specifier: ^5.2.2 + specifier: ^5.5.2 version: 5.5.3 vite: specifier: ^5.3.4 @@ -1215,7 +1224,7 @@ importers: specifier: ^2.6.2 version: 2.6.2 typescript: - specifier: ^5.4.5 + specifier: ^5.5.2 version: 5.5.3 packages/e2e.sandbox.catchall: @@ -1269,6 +1278,9 @@ importers: ts-expect: specifier: ^1.3.0 version: 1.3.0 + typescript: + specifier: ^5.5.2 + version: 5.5.3 packages/e2e.sandbox.todoapp: dependencies: @@ -2005,6 +2017,12 @@ importers: specifier: ^18.0.0 version: 18.17.15 + packages/monorepo.tool.attw: {} + + packages/monorepo.tool.transpile: {} + + packages/monorepo.tool.typecheck: {} + packages/monorepo.tsconfig: {} packages/monorepo.tsup: diff --git a/turbo.json b/turbo.json index eef1261c7..f3b738f7b 100644 --- a/turbo.json +++ b/turbo.json @@ -35,14 +35,9 @@ "inputs": ["dprint.json"] }, - /* Psuedo task to depend on the script contents */ - "//#script-check-attw": { - "inputs": ["scripts/build_common/check-attw.sh"] - }, - "check-attw": { "outputLogs": "new-only", - "dependsOn": ["//#script-check-attw", "transpile", "typecheck"], + "dependsOn": ["@osdk/monorepo.tool.attw#transpile", "transpile", "typecheck"], "inputs": ["build/{esm,cjs,browser}", "package.json"] }, @@ -67,6 +62,7 @@ "typecheck": { "outputLogs": "new-only", "inputs": [ + "bin/**", "src/**", "src/**/*.{mts,cts,ts,tsx}", "tsconfig.json", @@ -144,7 +140,7 @@ "transpile": { "outputLogs": "new-only", "dependsOn": ["@osdk/monorepo.tsup#typecheck", "@osdk/monorepo.tsconfig#typecheck", "^transpile", "codegen"], - "inputs": ["src/**", "tsup.config.js", "tsconfig.json", "tsconfig.cjs.json"], + "inputs": ["bin/**", "src/**", "tsup.config.js", "tsconfig.json", "tsconfig.cjs.json"], "outputs": ["dist/**", "lib/**", "build/**/*.{js,cjs,js.map,cjs.map}"] },