From 7a27fc8a787292ef4b61dba605c37aa058eeadb4 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Wed, 4 Oct 2023 00:44:35 -0700 Subject: [PATCH] Clean up lints --- @types/@rollup/plugin-commonjs/package.json | 6 +- @types/@rollup/plugin-commonjs/tsconfig.json | 6 +- .../plugin-node-resolve/.eslintrc.json | 28 +- .../@rollup/plugin-node-resolve/package.json | 6 +- .../@rollup/plugin-node-resolve/tsconfig.json | 6 +- @types/ansicolor/.eslintrc.json | 28 +- @types/ansicolor/package.json | 6 +- @types/ansicolor/tsconfig.json | 6 +- @types/lines-and-columns/package.json | 6 +- @types/lines-and-columns/tsconfig.json | 6 +- .../.eslintrc.json | 28 +- .../rollup-plugin-polyfill-node/package.json | 6 +- .../rollup-plugin-polyfill-node/tsconfig.json | 6 +- @types/shell-escape-tag/.eslintrc.json | 28 +- @types/shell-escape-tag/package.json | 6 +- @types/shell-escape-tag/tsconfig.json | 6 +- @types/shell-split/.eslintrc.json | 28 +- @types/shell-split/package.json | 6 +- @types/shell-split/tsconfig.json | 6 +- demos/preact-hello-world/.eslintrc.json | 40 ++- demos/preact-hello-world/package.json | 8 +- demos/preact-hello-world/tsconfig.json | 6 +- demos/preact/.eslintrc.json | 40 ++- demos/preact/package.json | 8 +- demos/preact/tsconfig.json | 4 +- demos/react-jsnation-workshop/.eslintrc.json | 40 ++- demos/react-jsnation-workshop/package.json | 8 +- demos/react-jsnation-workshop/tsconfig.json | 6 +- demos/react-jsnation/.eslintrc.json | 36 ++- demos/react-jsnation/package.json | 8 +- demos/react-jsnation/tests/.eslintrc.json | 27 +- demos/react-jsnation/tests/app.spec.tsx | 14 - demos/react-jsnation/tests/package.json | 28 +- demos/react-jsnation/tests/tsconfig.json | 8 +- demos/react-jsnation/tsconfig.json | 6 +- demos/react-lite-query/.eslintrc.json | 40 ++- demos/react-lite-query/package.json | 8 +- demos/react-lite-query/tsconfig.json | 6 +- demos/react-query/.eslintrc.json | 40 ++- demos/react-query/package.json | 8 +- demos/react-query/tsconfig.json | 6 +- demos/react-stock-ticker/.eslintrc.json | 40 ++- demos/react-stock-ticker/package.json | 8 +- .../react-stock-ticker/src/lib/formatting.ts | 4 +- demos/react-stock-ticker/tsconfig.json | 6 +- demos/react-store/.eslintrc.json | 40 ++- demos/react-store/package.json | 8 +- .../react-store/src/components/DataTable.tsx | 2 - demos/react-store/src/index.tsx | 2 - demos/react-store/tsconfig.json | 6 +- demos/react/.eslintrc.json | 40 ++- demos/react/package.json | 8 +- demos/react/tsconfig.json | 6 +- .../preact-testing-utils/.eslintrc.json | 28 +- .../preact/preact-testing-utils/package.json | 8 +- .../preact-testing-utils/tests/.eslintrc.json | 31 ++- .../preact-testing-utils/tests/package.json | 30 +- .../preact-testing-utils/tests/tsconfig.json | 4 +- packages/preact/preact-utils/.eslintrc.json | 28 +- packages/preact/preact-utils/package.json | 8 +- .../preact/preact-utils/tests/.eslintrc.json | 31 ++- .../preact/preact-utils/tests/package.json | 28 +- .../preact/preact-utils/tests/tsconfig.json | 4 +- packages/preact/preact/.eslintrc.json | 28 +- packages/preact/preact/package.json | 8 +- packages/preact/preact/tests/.eslintrc.json | 31 ++- packages/preact/preact/tests/package.json | 30 +- .../preact/preact/tests/resources.spec.ts | 1 - packages/preact/preact/tests/tsconfig.json | 4 +- packages/react/react/.eslintrc.json | 28 +- packages/react/react/package.json | 8 +- packages/react/react/src/debug/warnings.ts | 76 +---- packages/react/react/src/hooks/setup.ts | 2 - packages/react/react/tests/.eslintrc.json | 31 ++- packages/react/react/tests/package.json | 30 +- .../react/react/tests/resource-stages.spec.ts | 17 -- packages/react/react/tests/tsconfig.json | 4 +- packages/react/react/tsconfig.json | 4 +- packages/react/test-utils/.eslintrc.json | 28 +- packages/react/test-utils/package.json | 8 +- .../react/use-strict-lifecycle/.eslintrc.json | 28 +- .../react/use-strict-lifecycle/package.json | 8 +- .../use-strict-lifecycle/tests/.eslintrc.json | 31 ++- .../use-strict-lifecycle/tests/package.json | 28 +- .../use-strict-lifecycle/tests/tsconfig.json | 4 +- .../tests/use-lifecycle.spec.ts | 259 ++---------------- packages/universal/collections/.eslintrc.json | 28 +- packages/universal/collections/package.json | 8 +- .../universal/collections/src/decorator.ts | 2 - .../collections/tests/.eslintrc.json | 31 ++- .../universal/collections/tests/array.spec.ts | 2 - .../collections/tests/object.spec.ts | 26 +- .../universal/collections/tests/package.json | 28 +- .../universal/collections/tests/tsconfig.json | 4 +- packages/universal/core-utils/.eslintrc.json | 28 +- packages/universal/core-utils/package.json | 8 +- .../universal/core-utils/tests/.eslintrc.json | 31 ++- .../universal/core-utils/tests/package.json | 24 +- .../universal/core-utils/tests/tsconfig.json | 4 +- packages/universal/core/.eslintrc.json | 28 +- packages/universal/core/package.json | 8 +- packages/universal/debug/.eslintrc.json | 28 +- packages/universal/debug/package.json | 8 +- .../debug/src/call-stack/debug/module.ts | 25 +- packages/universal/debug/tests/.eslintrc.json | 31 ++- packages/universal/debug/tests/package.json | 26 +- packages/universal/debug/tests/tsconfig.json | 4 +- packages/universal/interfaces/.eslintrc.json | 28 +- packages/universal/interfaces/package.json | 8 +- packages/universal/interfaces/tsconfig.json | 4 +- packages/universal/modifier/.eslintrc.json | 28 +- packages/universal/modifier/package.json | 8 +- packages/universal/modifier/src/modifier.ts | 12 +- packages/universal/reactive/.eslintrc.json | 28 +- packages/universal/reactive/package.json | 8 +- .../universal/reactive/tests/.eslintrc.json | 31 ++- .../universal/reactive/tests/package.json | 30 +- .../universal/reactive/tests/tsconfig.json | 4 +- packages/universal/renderer/.eslintrc.json | 28 +- packages/universal/renderer/package.json | 8 +- .../universal/renderer/tests/.eslintrc.json | 31 ++- .../universal/renderer/tests/package.json | 26 +- .../universal/renderer/tests/tsconfig.json | 4 +- packages/universal/resource/.eslintrc.json | 28 +- packages/universal/resource/package.json | 8 +- .../universal/resource/tests/.eslintrc.json | 31 ++- .../universal/resource/tests/package.json | 30 +- .../universal/resource/tests/resource.spec.ts | 137 --------- .../universal/resource/tests/tsconfig.json | 8 +- packages/universal/runtime/.eslintrc.json | 28 +- packages/universal/runtime/package.json | 8 +- .../universal/runtime/tests/.eslintrc.json | 31 ++- packages/universal/runtime/tests/package.json | 30 +- .../universal/runtime/tests/tsconfig.json | 4 +- packages/universal/service/.eslintrc.json | 28 +- packages/universal/service/package.json | 8 +- .../universal/service/tests/.eslintrc.json | 31 ++- packages/universal/service/tests/package.json | 30 +- .../universal/service/tests/tsconfig.json | 8 +- packages/universal/shared/.eslintrc.json | 28 +- packages/universal/shared/package.json | 8 +- .../universal/shared/tests/.eslintrc.json | 31 ++- packages/universal/shared/tests/package.json | 28 +- packages/universal/shared/tests/tsconfig.json | 4 +- packages/universal/shared/tsconfig.json | 4 +- packages/universal/tags/.eslintrc.json | 28 +- packages/universal/tags/package.json | 8 +- packages/universal/universal/.eslintrc.json | 28 +- packages/universal/universal/package.json | 8 +- .../universal/universal/tests/.eslintrc.json | 31 ++- .../universal/universal/tests/package.json | 30 +- .../universal/universal/tests/tsconfig.json | 8 +- packages/universal/verify/.eslintrc.json | 28 +- packages/universal/verify/package.json | 8 +- packages/universal/verify/tests/tsconfig.json | 4 +- packages/vue/vue-testing-utils/.eslintrc.json | 28 +- packages/vue/vue-testing-utils/package.json | 8 +- .../vue-testing-utils/tests/.eslintrc.json | 31 ++- .../vue/vue-testing-utils/tests/package.json | 30 +- .../vue/vue-testing-utils/tests/tsconfig.json | 4 +- packages/vue/vue/.eslintrc.json | 28 +- packages/vue/vue/package.json | 8 +- packages/vue/vue/tests/.eslintrc.json | 31 ++- packages/vue/vue/tests/create.spec.ts | 28 -- packages/vue/vue/tests/package.json | 30 +- packages/vue/vue/tests/tsconfig.json | 4 +- packages/x/devtool/.eslintrc.json | 28 +- packages/x/devtool/index.tsx | 1 - packages/x/devtool/package.json | 8 +- packages/x/devtool/src/log/cell.tsx | 5 - packages/x/devtool/src/log/shared.ts | 9 - packages/x/headless-form/.eslintrc.json | 28 +- packages/x/headless-form/package.json | 8 +- packages/x/store/.eslintrc.json | 28 +- packages/x/store/package.json | 8 +- packages/x/store/tests/.eslintrc.json | 31 ++- packages/x/store/tests/package.json | 26 +- packages/x/store/tests/tsconfig.json | 4 +- packages/x/vanilla/.eslintrc.json | 28 +- packages/x/vanilla/package.json | 8 +- packages/x/vanilla/tests/.eslintrc.json | 31 ++- packages/x/vanilla/tests/package.json | 26 +- packages/x/vanilla/tests/tsconfig.json | 4 +- workspace/@domtree/any/.eslintrc.json | 28 +- workspace/@domtree/any/package.json | 8 +- workspace/@domtree/any/tsconfig.json | 6 +- workspace/@domtree/browser/.eslintrc.json | 28 +- workspace/@domtree/browser/package.json | 8 +- workspace/@domtree/browser/tsconfig.json | 6 +- workspace/@domtree/flavors/.eslintrc.json | 28 +- workspace/@domtree/flavors/package.json | 8 +- workspace/@domtree/flavors/tsconfig.json | 6 +- workspace/@domtree/interface/.eslintrc.json | 28 +- workspace/@domtree/interface/package.json | 8 +- workspace/@domtree/interface/tsconfig.json | 6 +- workspace/@domtree/minimal/.eslintrc.json | 28 +- workspace/@domtree/minimal/package.json | 8 +- workspace/@domtree/minimal/tsconfig.json | 6 +- workspace/build/.eslintrc.json | 28 +- workspace/build/package.json | 8 +- workspace/build/tsconfig.json | 18 +- workspace/edit-json/.eslintrc.json | 28 +- workspace/edit-json/package.json | 8 +- workspace/edit-json/tests/.eslintrc.json | 31 ++- workspace/edit-json/tests/package.json | 28 +- workspace/edit-json/tests/tsconfig.json | 4 +- workspace/eslint/.eslintrc.json | 28 +- workspace/eslint/package.json | 8 +- workspace/eslint/src/tight.js | 5 +- workspace/eslint/tsconfig.json | 12 +- workspace/json/.eslintrc.json | 28 +- workspace/json/package.json | 8 +- workspace/json/tsconfig.json | 6 +- workspace/misc/.eslintrc.json | 28 +- workspace/misc/package.json | 8 +- workspace/misc/tsconfig.json | 6 +- workspace/package/.eslintrc.json | 28 +- workspace/package/package.json | 8 +- workspace/package/tsconfig.json | 6 +- workspace/paths/.eslintrc.json | 28 +- workspace/paths/package.json | 8 +- workspace/paths/tsconfig.json | 6 +- workspace/reporter/.eslintrc.json | 28 +- workspace/reporter/package.json | 8 +- workspace/reporter/src/format.ts | 28 -- workspace/reporter/src/logger.ts | 27 -- workspace/reporter/tsconfig.json | 6 +- workspace/schemas/.eslintrc.json | 29 +- workspace/schemas/package.json | 8 +- workspace/schemas/tsconfig.json | 18 +- workspace/scripts/.eslintrc.json | 28 +- workspace/scripts/package.json | 8 +- .../src/support/updating/update-file.ts | 1 + workspace/scripts/src/template.ts | 1 - workspace/scripts/tsconfig.json | 10 +- workspace/shared/.eslintrc.json | 28 +- workspace/shared/package.json | 8 +- workspace/shared/tsconfig.json | 6 +- workspace/test-utils/.eslintrc.json | 28 +- workspace/test-utils/package.json | 8 +- workspace/unstable-release/.eslintrc.json | 28 +- workspace/unstable-release/package.json | 8 +- workspace/utils/.eslintrc.json | 28 +- workspace/utils/package.json | 8 +- workspace/utils/tsconfig.json | 6 +- workspace/workspace/.eslintrc.json | 28 +- workspace/workspace/package.json | 8 +- workspace/workspace/src/workspace.ts | 2 - workspace/workspace/tsconfig.json | 6 +- 249 files changed, 2568 insertions(+), 2012 deletions(-) delete mode 100644 packages/x/devtool/src/log/shared.ts diff --git a/@types/@rollup/plugin-commonjs/package.json b/@types/@rollup/plugin-commonjs/package.json index 24ffd155..b78fad9e 100644 --- a/@types/@rollup/plugin-commonjs/package.json +++ b/@types/@rollup/plugin-commonjs/package.json @@ -9,11 +9,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/@rollup/plugin-commonjs/tsconfig.json b/@types/@rollup/plugin-commonjs/tsconfig.json index f8900d97..342c18f6 100644 --- a/@types/@rollup/plugin-commonjs/tsconfig.json +++ b/@types/@rollup/plugin-commonjs/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/@types/@rollup/plugin-node-resolve/.eslintrc.json b/@types/@rollup/plugin-node-resolve/.eslintrc.json index 069f98c4..9c98e0bc 100644 --- a/@types/@rollup/plugin-node-resolve/.eslintrc.json +++ b/@types/@rollup/plugin-node-resolve/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.d.ts", "src/**/*.d.ts"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.d.ts", + "src/**/*.d.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/@types/@rollup/plugin-node-resolve/package.json b/@types/@rollup/plugin-node-resolve/package.json index e98c47ac..02e40950 100644 --- a/@types/@rollup/plugin-node-resolve/package.json +++ b/@types/@rollup/plugin-node-resolve/package.json @@ -9,11 +9,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/@rollup/plugin-node-resolve/tsconfig.json b/@types/@rollup/plugin-node-resolve/tsconfig.json index f8900d97..342c18f6 100644 --- a/@types/@rollup/plugin-node-resolve/tsconfig.json +++ b/@types/@rollup/plugin-node-resolve/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/@types/ansicolor/.eslintrc.json b/@types/ansicolor/.eslintrc.json index 07c7f73a..deac56c2 100644 --- a/@types/ansicolor/.eslintrc.json +++ b/@types/ansicolor/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.d.ts", "src/**/*.d.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.d.ts", + "src/**/*.d.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/@types/ansicolor/package.json b/@types/ansicolor/package.json index 9ae6904e..0cc202b9 100644 --- a/@types/ansicolor/package.json +++ b/@types/ansicolor/package.json @@ -10,11 +10,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/ansicolor/tsconfig.json b/@types/ansicolor/tsconfig.json index 0bacc745..9084e562 100644 --- a/@types/ansicolor/tsconfig.json +++ b/@types/ansicolor/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "node", diff --git a/@types/lines-and-columns/package.json b/@types/lines-and-columns/package.json index 9e14e081..8a4225c7 100644 --- a/@types/lines-and-columns/package.json +++ b/@types/lines-and-columns/package.json @@ -8,11 +8,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/lines-and-columns/tsconfig.json b/@types/lines-and-columns/tsconfig.json index 0bacc745..9084e562 100644 --- a/@types/lines-and-columns/tsconfig.json +++ b/@types/lines-and-columns/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "node", diff --git a/@types/rollup-plugin-polyfill-node/.eslintrc.json b/@types/rollup-plugin-polyfill-node/.eslintrc.json index 069f98c4..9c98e0bc 100644 --- a/@types/rollup-plugin-polyfill-node/.eslintrc.json +++ b/@types/rollup-plugin-polyfill-node/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.d.ts", "src/**/*.d.ts"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.d.ts", + "src/**/*.d.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/@types/rollup-plugin-polyfill-node/package.json b/@types/rollup-plugin-polyfill-node/package.json index 7fc08e4c..4df6ada7 100644 --- a/@types/rollup-plugin-polyfill-node/package.json +++ b/@types/rollup-plugin-polyfill-node/package.json @@ -9,11 +9,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/rollup-plugin-polyfill-node/tsconfig.json b/@types/rollup-plugin-polyfill-node/tsconfig.json index cddac61d..01645bc6 100644 --- a/@types/rollup-plugin-polyfill-node/tsconfig.json +++ b/@types/rollup-plugin-polyfill-node/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/@types/shell-escape-tag/.eslintrc.json b/@types/shell-escape-tag/.eslintrc.json index 069f98c4..9c98e0bc 100644 --- a/@types/shell-escape-tag/.eslintrc.json +++ b/@types/shell-escape-tag/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.d.ts", "src/**/*.d.ts"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.d.ts", + "src/**/*.d.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/@types/shell-escape-tag/package.json b/@types/shell-escape-tag/package.json index 8f378dbb..b4ee5bf3 100644 --- a/@types/shell-escape-tag/package.json +++ b/@types/shell-escape-tag/package.json @@ -8,11 +8,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/shell-escape-tag/tsconfig.json b/@types/shell-escape-tag/tsconfig.json index 0bacc745..9084e562 100644 --- a/@types/shell-escape-tag/tsconfig.json +++ b/@types/shell-escape-tag/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "node", diff --git a/@types/shell-split/.eslintrc.json b/@types/shell-split/.eslintrc.json index 069f98c4..9c98e0bc 100644 --- a/@types/shell-split/.eslintrc.json +++ b/@types/shell-split/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.d.ts", "src/**/*.d.ts"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.d.ts", + "src/**/*.d.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/@types/shell-split/package.json b/@types/shell-split/package.json index ef57378d..76f1ec77 100644 --- a/@types/shell-split/package.json +++ b/@types/shell-split/package.json @@ -9,11 +9,7 @@ } }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts" - } - }, + "exports": "./dist/index.d.ts", "types": "dist/index.d.ts" }, "starbeam": { diff --git a/@types/shell-split/tsconfig.json b/@types/shell-split/tsconfig.json index 0bacc745..9084e562 100644 --- a/@types/shell-split/tsconfig.json +++ b/@types/shell-split/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "node", diff --git a/demos/preact-hello-world/.eslintrc.json b/demos/preact-hello-world/.eslintrc.json index 21b3cdca..7cc87a14 100644 --- a/demos/preact-hello-world/.eslintrc.json +++ b/demos/preact-hello-world/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/preact-hello-world/package.json b/demos/preact-hello-world/package.json index 3bfe6091..29f68922 100644 --- a/demos/preact-hello-world/package.json +++ b/demos/preact-hello-world/package.json @@ -7,11 +7,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/preact-hello-world/tsconfig.json b/demos/preact-hello-world/tsconfig.json index e7b41935..2085369a 100644 --- a/demos/preact-hello-world/tsconfig.json +++ b/demos/preact-hello-world/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { + + "allowJs": true, "jsx": "react-jsx", "jsxImportSource": "preact", "types": [ @@ -11,9 +13,7 @@ "../../packages/env.d.ts", "../../packages/env.d.ts", "../../packages/env.d.ts" - ], - - "allowJs": true + ] }, "exclude": ["dist/**/*"] } diff --git a/demos/preact/.eslintrc.json b/demos/preact/.eslintrc.json index 21b3cdca..7cc87a14 100644 --- a/demos/preact/.eslintrc.json +++ b/demos/preact/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/preact/package.json b/demos/preact/package.json index 72465bf7..a3e07853 100644 --- a/demos/preact/package.json +++ b/demos/preact/package.json @@ -7,11 +7,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/preact/tsconfig.json b/demos/preact/tsconfig.json index 0e15e297..786dd545 100644 --- a/demos/preact/tsconfig.json +++ b/demos/preact/tsconfig.json @@ -13,6 +13,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "src/**/*.tsx", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "src/**/*.tsx", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react-jsnation-workshop/.eslintrc.json b/demos/react-jsnation-workshop/.eslintrc.json index 9229454a..c8f1e985 100644 --- a/demos/react-jsnation-workshop/.eslintrc.json +++ b/demos/react-jsnation-workshop/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/demos"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/demos" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/react-jsnation-workshop/package.json b/demos/react-jsnation-workshop/package.json index b99bc7f0..74c408b9 100644 --- a/demos/react-jsnation-workshop/package.json +++ b/demos/react-jsnation-workshop/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react-jsnation-workshop/tsconfig.json b/demos/react-jsnation-workshop/tsconfig.json index ca4752b7..bf51f796 100644 --- a/demos/react-jsnation-workshop/tsconfig.json +++ b/demos/react-jsnation-workshop/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", @@ -12,6 +12,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react-jsnation/.eslintrc.json b/demos/react-jsnation/.eslintrc.json index 9fb0c333..c8f1e985 100644 --- a/demos/react-jsnation/.eslintrc.json +++ b/demos/react-jsnation/.eslintrc.json @@ -1,25 +1,45 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/demos"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/demos" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/demos/react-jsnation/package.json b/demos/react-jsnation/package.json index 5b524617..016a113e 100644 --- a/demos/react-jsnation/package.json +++ b/demos/react-jsnation/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react-jsnation/tests/.eslintrc.json b/demos/react-jsnation/tests/.eslintrc.json index b0b22424..9b58b6e4 100644 --- a/demos/react-jsnation/tests/.eslintrc.json +++ b/demos/react-jsnation/tests/.eslintrc.json @@ -1,18 +1,33 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/demos/react-jsnation/tests/app.spec.tsx b/demos/react-jsnation/tests/app.spec.tsx index 8527a506..0a34b336 100644 --- a/demos/react-jsnation/tests/app.spec.tsx +++ b/demos/react-jsnation/tests/app.spec.tsx @@ -38,18 +38,4 @@ describe("react-jsnation", () => { ).toThrow(); expect(result.findByText("My Locale").innerHTML).toBeDefined(); }); - - // afterEach(cleanup); - - // test("App loads DataTable", () => { - // const result = render(, { legacyRoot: true }); - - // expect(result.getByText("Create a new user")).toBeDefined(); - // }); - - // test("App loads LocaleSelector", () => { - // render(); - - // expect(screen.getByText("My Locale")).toBeDefined(); - // }); }); diff --git a/demos/react-jsnation/tests/package.json b/demos/react-jsnation/tests/package.json index 34b20123..54dd7fde 100644 --- a/demos/react-jsnation/tests/package.json +++ b/demos/react-jsnation/tests/package.json @@ -1,4 +1,17 @@ { + "private": true, + "name": "@starbeam-tests/demos-react-jsnation", + "version": "1.0.0", + "type": "module", + "starbeam": { + "jsx": "react", + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { "@starbeam-demos/react-jsnation": "workspace:^", "@starbeam-workspace/react-test-utils": "workspace:^", @@ -12,18 +25,5 @@ "@testing-library/react": "^14.0.0", "@types/react": "^18.2.22", "jsdom": "^22.1.0" - }, - "name": "@starbeam-tests/demos-react-jsnation", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "jsx": "react", - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/demos/react-jsnation/tests/tsconfig.json b/demos/react-jsnation/tests/tsconfig.json index 54529610..6432d925 100644 --- a/demos/react-jsnation/tests/tsconfig.json +++ b/demos/react-jsnation/tests/tsconfig.json @@ -1,13 +1,13 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/demos/react-jsnation/tsconfig.json b/demos/react-jsnation/tsconfig.json index e51a759c..d77aaece 100644 --- a/demos/react-jsnation/tsconfig.json +++ b/demos/react-jsnation/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", @@ -12,6 +12,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts", "vitest.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts", "vitest.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react-lite-query/.eslintrc.json b/demos/react-lite-query/.eslintrc.json index 9229454a..c8f1e985 100644 --- a/demos/react-lite-query/.eslintrc.json +++ b/demos/react-lite-query/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/demos"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/demos" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/react-lite-query/package.json b/demos/react-lite-query/package.json index 842aa7f6..bc7691a0 100644 --- a/demos/react-lite-query/package.json +++ b/demos/react-lite-query/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react-lite-query/tsconfig.json b/demos/react-lite-query/tsconfig.json index ca4752b7..bf51f796 100644 --- a/demos/react-lite-query/tsconfig.json +++ b/demos/react-lite-query/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", @@ -12,6 +12,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react-query/.eslintrc.json b/demos/react-query/.eslintrc.json index 21b3cdca..7cc87a14 100644 --- a/demos/react-query/.eslintrc.json +++ b/demos/react-query/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/react-query/package.json b/demos/react-query/package.json index 0d438c26..ba894fc7 100644 --- a/demos/react-query/package.json +++ b/demos/react-query/package.json @@ -7,11 +7,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react-query/tsconfig.json b/demos/react-query/tsconfig.json index ca4752b7..bf51f796 100644 --- a/demos/react-query/tsconfig.json +++ b/demos/react-query/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", @@ -12,6 +12,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react-stock-ticker/.eslintrc.json b/demos/react-stock-ticker/.eslintrc.json index 9229454a..c8f1e985 100644 --- a/demos/react-stock-ticker/.eslintrc.json +++ b/demos/react-stock-ticker/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/demos"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/demos" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/react-stock-ticker/package.json b/demos/react-stock-ticker/package.json index 9765182e..8cbde7f8 100644 --- a/demos/react-stock-ticker/package.json +++ b/demos/react-stock-ticker/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react-stock-ticker/src/lib/formatting.ts b/demos/react-stock-ticker/src/lib/formatting.ts index f09ff6a5..f06a4a1d 100644 --- a/demos/react-stock-ticker/src/lib/formatting.ts +++ b/demos/react-stock-ticker/src/lib/formatting.ts @@ -1,4 +1,6 @@ -// format as YYYY-MM-DD +/** + * format a date as YYYY-MM-DD + */ const DateTimeFormat = new Intl.DateTimeFormat("fr-CA", { year: "numeric", month: "2-digit", diff --git a/demos/react-stock-ticker/tsconfig.json b/demos/react-stock-ticker/tsconfig.json index ca4752b7..bf51f796 100644 --- a/demos/react-stock-ticker/tsconfig.json +++ b/demos/react-stock-ticker/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", @@ -12,6 +12,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react-store/.eslintrc.json b/demos/react-store/.eslintrc.json index 9229454a..c8f1e985 100644 --- a/demos/react-store/.eslintrc.json +++ b/demos/react-store/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/demos"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/demos" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/react-store/package.json b/demos/react-store/package.json index 2006afb2..fba14114 100644 --- a/demos/react-store/package.json +++ b/demos/react-store/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react-store/src/components/DataTable.tsx b/demos/react-store/src/components/DataTable.tsx index fe8a2c2d..7b4ee76f 100644 --- a/demos/react-store/src/components/DataTable.tsx +++ b/demos/react-store/src/components/DataTable.tsx @@ -9,8 +9,6 @@ export default function (props: { locale: string }): JSX.Element { const locale = useProp(props.locale, "props.locale"); const { people, append, filter, total, rows, table } = setup(() => { - // component.attach(DevTools); - const table = Table.create({ columns: ["name", "location"], name: "people", diff --git a/demos/react-store/src/index.tsx b/demos/react-store/src/index.tsx index 45c7f87e..a4b29800 100644 --- a/demos/react-store/src/index.tsx +++ b/demos/react-store/src/index.tsx @@ -2,8 +2,6 @@ import * as ReactDOM from "react-dom/client"; import App from "./components/App.jsx"; -// const dev = devtool(); - const container = document.querySelector("#root"); if (!container) { diff --git a/demos/react-store/tsconfig.json b/demos/react-store/tsconfig.json index ca4752b7..bf51f796 100644 --- a/demos/react-store/tsconfig.json +++ b/demos/react-store/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", @@ -12,6 +12,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/demos/react/.eslintrc.json b/demos/react/.eslintrc.json index 21b3cdca..7cc87a14 100644 --- a/demos/react/.eslintrc.json +++ b/demos/react/.eslintrc.json @@ -1,25 +1,45 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/loose"], - "files": ["vite.config.ts"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "vite.config.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/demos/react/package.json b/demos/react/package.json index e1ecd93c..3e3563c2 100644 --- a/demos/react/package.json +++ b/demos/react/package.json @@ -7,11 +7,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/demos/react/tsconfig.json b/demos/react/tsconfig.json index a38187b6..a7b90e0b 100644 --- a/demos/react/tsconfig.json +++ b/demos/react/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "../../.config/tsconfig/tsconfig.demo.json", "compilerOptions": { - "jsxImportSource": "react", "jsx": "react-jsx", + "jsxImportSource": "react", "types": [ "../../packages/env.d.ts", "react", @@ -14,6 +14,6 @@ "../../packages/env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*", "vite.config.ts"] + "include": ["index.ts", "src/**/*", "vite.config.ts"], + "exclude": ["dist/**/*"] } diff --git a/packages/preact/preact-testing-utils/.eslintrc.json b/packages/preact/preact-testing-utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/preact/preact-testing-utils/.eslintrc.json +++ b/packages/preact/preact-testing-utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/preact/preact-testing-utils/package.json b/packages/preact/preact-testing-utils/package.json index b67441f4..c16fed6d 100644 --- a/packages/preact/preact-testing-utils/package.json +++ b/packages/preact/preact-testing-utils/package.json @@ -5,11 +5,9 @@ "type": "module", "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/preact/preact-testing-utils/tests/.eslintrc.json b/packages/preact/preact-testing-utils/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/preact/preact-testing-utils/tests/.eslintrc.json +++ b/packages/preact/preact-testing-utils/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/preact/preact-testing-utils/tests/package.json b/packages/preact/preact-testing-utils/tests/package.json index 97555078..b770a25b 100644 --- a/packages/preact/preact-testing-utils/tests/package.json +++ b/packages/preact/preact-testing-utils/tests/package.json @@ -1,11 +1,23 @@ { + "private": true, + "name": "@starbeam-tests/preact-testing-utils", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/preact-testing-utils": "workspace:^", - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/preact": "workspace:^", "@starbeam/runtime": "workspace:^", "@starbeam/universal": "workspace:^", + "@starbeam-workspace/preact-testing-utils": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", "@testing-library/dom": "^9.2.0", "@testing-library/preact": "^3.2.3", "htm": "^3.1.1", @@ -15,17 +27,5 @@ "devDependencies": { "@starbeam/eslint-plugin": "workspace:^", "preact-render-to-string": "^6.2.1" - }, - "name": "@starbeam-tests/preact-testing-utils", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/preact/preact-testing-utils/tests/tsconfig.json b/packages/preact/preact-testing-utils/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/preact/preact-testing-utils/tests/tsconfig.json +++ b/packages/preact/preact-testing-utils/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/preact/preact-utils/.eslintrc.json b/packages/preact/preact-utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/preact/preact-utils/.eslintrc.json +++ b/packages/preact/preact-utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/preact/preact-utils/package.json b/packages/preact/preact-utils/package.json index fcc3c8f6..ca552620 100644 --- a/packages/preact/preact-utils/package.json +++ b/packages/preact/preact-utils/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/preact/preact-utils/tests/.eslintrc.json b/packages/preact/preact-utils/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/preact/preact-utils/tests/.eslintrc.json +++ b/packages/preact/preact-utils/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/preact/preact-utils/tests/package.json b/packages/preact/preact-utils/tests/package.json index 72b13a87..d1d7e55b 100644 --- a/packages/preact/preact-utils/tests/package.json +++ b/packages/preact/preact-utils/tests/package.json @@ -1,10 +1,22 @@ { + "private": true, + "name": "@starbeam-tests/preact-utils", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/preact": "workspace:^", "@starbeam/runtime": "workspace:^", "@starbeam/universal": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", "@testing-library/dom": "^9.2.0", "@testing-library/preact": "^3.2.3", "htm": "^3.1.1", @@ -14,17 +26,5 @@ "devDependencies": { "@starbeam/eslint-plugin": "workspace:^", "preact-render-to-string": "^6.2.1" - }, - "name": "@starbeam-tests/preact-utils", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/preact/preact-utils/tests/tsconfig.json b/packages/preact/preact-utils/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/preact/preact-utils/tests/tsconfig.json +++ b/packages/preact/preact-utils/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/preact/preact/.eslintrc.json b/packages/preact/preact/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/preact/preact/.eslintrc.json +++ b/packages/preact/preact/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/preact/preact/package.json b/packages/preact/preact/package.json index e6a70f09..51b5be0c 100644 --- a/packages/preact/preact/package.json +++ b/packages/preact/preact/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/preact/preact/tests/.eslintrc.json b/packages/preact/preact/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/preact/preact/tests/.eslintrc.json +++ b/packages/preact/preact/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/preact/preact/tests/package.json b/packages/preact/preact/tests/package.json index 0d935e9c..d04af563 100644 --- a/packages/preact/preact/tests/package.json +++ b/packages/preact/preact/tests/package.json @@ -1,13 +1,25 @@ { + "private": true, + "name": "@starbeam-tests/preact", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/preact-testing-utils": "workspace:^", - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/preact": "workspace:^", "@starbeam/resource": "workspace:^", "@starbeam/runtime": "workspace:^", "@starbeam/service": "workspace:^", "@starbeam/universal": "workspace:^", + "@starbeam-workspace/preact-testing-utils": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", "@testing-library/dom": "^9.2.0", "@testing-library/preact": "^3.2.3", "jsdom": "^22.1.0", @@ -16,17 +28,5 @@ "devDependencies": { "@starbeam/eslint-plugin": "workspace:^", "preact-render-to-string": "^6.2.1" - }, - "name": "@starbeam-tests/preact", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/preact/preact/tests/resources.spec.ts b/packages/preact/preact/tests/resources.spec.ts index cfe1736e..74a95277 100644 --- a/packages/preact/preact/tests/resources.spec.ts +++ b/packages/preact/preact/tests/resources.spec.ts @@ -65,7 +65,6 @@ function expectResource( result.unmount(); events.expect("cleanup", "finalize"); - // expect(resources.last.isActive).toBe(false); }, "test function was defined here", { entryFn: expectResource }, diff --git a/packages/preact/preact/tests/tsconfig.json b/packages/preact/preact/tests/tsconfig.json index e267e100..0dd40eb3 100644 --- a/packages/preact/preact/tests/tsconfig.json +++ b/packages/preact/preact/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/react/react/.eslintrc.json b/packages/react/react/.eslintrc.json index 953bbc38..aff01754 100644 --- a/packages/react/react/.eslintrc.json +++ b/packages/react/react/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/react/react/package.json b/packages/react/react/package.json index ddfb0cdc..0c3ebd32 100644 --- a/packages/react/react/package.json +++ b/packages/react/react/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/react/react/src/debug/warnings.ts b/packages/react/react/src/debug/warnings.ts index c452901a..359e7cdf 100644 --- a/packages/react/react/src/debug/warnings.ts +++ b/packages/react/react/src/debug/warnings.ts @@ -7,86 +7,16 @@ let WARNED = false; if (import.meta.env.DEV) { const debug = verified(DEBUG, isPresent); - debug.untrackedReadBarrier((tag, _caller) => { + debug.untrackedReadBarrier((_tag, _caller) => { if (isRendering()) { if (!WARNED) { WARNED = true; - const description = debug.getUserFacing(tag.description); - const _fullName = description && debug.describe(description); - - const _pad = Math.max( - ...["Created: ", "Accessed: "].map((s) => s.length) - ); - - // const message = Message([ - // [ - // ["ERROR", "color:#f00", "font-weight:bold"], - // " ", - // [ - // "You read from a reactive value but you were not inside the `useReactive` hook.", - // "color: #b00", - // ], - // ], - // "", - // [ - // ["Created: ".padEnd(pad, "…"), "color:#666"], - // " ", - // [fullName, "color:#6a6"], - // ], - // // FIXME: frame.link() - // // [ - // // [" ".repeat(pad), "color:#666"], - // // " ", - // // [description.frame?.link() ?? "", "color:#6a6"], - // // ], - // // [ - // // ["Accessed: ".padEnd(pad, "…"), "color:#666"], - // // " ", - // // [caller?.link() ?? "", "color:#6a6"], - // // ], - // "", - // [ - // [ - // "This will prevent React from re-rendering when the reactive value changes.", - // "color:#b00", - // ], - // ], - // "", - // [ - // [ - // "Make sure that you are inside a `useReactive` hook whenever you access reactive state.", - // "color:#559", - // ], - // ], - // "", - // [ - // [ - // "You can wrap your entire component in `useReactive`, and return JSX to avoid this error. If you are also creating reactive cells in your component, you can use the `useSetup` hook to create cells and return JSX that reads from those cells.", - // "color:#559", - // ], - // ], - // "", - // [ - // [ - // "You can also use the `starbeam` HOC to create a component that automatically wraps your the entire body of your component in `useSetup`.", - // "color:#559", - // ], - // ], - // ]); - - // console.warn(...message); - - // FIXME: caller.stack - // if (caller) { - // console.groupCollapsed("Complete stack trace"); - // console.log(caller.stack); - // console.groupEnd(); - // } + // @todo restore this warning } throw Error( - `You read from a reactive value, but you were not inside the \`useReactive\` hook.` + `You read from a reactive value, but you were not inside the \`useReactive\` hook.`, ); } }); diff --git a/packages/react/react/src/hooks/setup.ts b/packages/react/react/src/hooks/setup.ts index 9ab4a24c..cfbb7251 100644 --- a/packages/react/react/src/hooks/setup.ts +++ b/packages/react/react/src/hooks/setup.ts @@ -57,8 +57,6 @@ export function setup(blueprint: SetupBlueprint): T { * whenever the blueprint's dependencies change. */ export function setupReactive(blueprint: UseReactive): Reactive { - // return managerSetupReactive(MANAGER, blueprint); - const [blueprintRef] = useLastRenderRef(blueprint); return createReactive(blueprintRef, undefined); } diff --git a/packages/react/react/tests/.eslintrc.json b/packages/react/react/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/react/react/tests/.eslintrc.json +++ b/packages/react/react/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/react/react/tests/package.json b/packages/react/react/tests/package.json index d9008fea..72be6938 100644 --- a/packages/react/react/tests/package.json +++ b/packages/react/react/tests/package.json @@ -1,29 +1,29 @@ { + "private": true, + "name": "@starbeam-tests/react", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/react-test-utils": "workspace:^", - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/react": "workspace:^", "@starbeam/reactive": "workspace:^", "@starbeam/runtime": "workspace:^", "@starbeam/universal": "workspace:^", + "@starbeam-workspace/react-test-utils": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", "jsdom": "^22.1.0", "react": "^18.2.0", "vitest": "^0.34.4" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/react", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/react/react/tests/resource-stages.spec.ts b/packages/react/react/tests/resource-stages.spec.ts index e842e21b..bde92163 100644 --- a/packages/react/react/tests/resource-stages.spec.ts +++ b/packages/react/react/tests/resource-stages.spec.ts @@ -66,22 +66,5 @@ describeInDev("resources running in stages", () => { await result.rerender(); expect(result.value).toBe(1); events.expect("cleanup", "sync"); - - // markers.sync.mark(); - // await result.rerender(); - // expect(result.value).toBe(2); - // expect(counts.setup).toBe(2); - // expect(counts.cleanup).toBe(1); - - // await result.find("button").fire.click(); - // expect(result.value).toBe(3); - - // markers.constructor.mark(); - // await result.rerender(); - // expect(result.value).toBe(3); - // expect(counts.setup).toBe(3); - // expect(counts.cleanup).toBe(2); - // expect(counts.init).toBe(initial.init + 1); - // expect(counts.finalized).toBe(initial.finalized + 1); }); }); diff --git a/packages/react/react/tests/tsconfig.json b/packages/react/react/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/react/react/tests/tsconfig.json +++ b/packages/react/react/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/react/react/tsconfig.json b/packages/react/react/tsconfig.json index 7cf4bb23..4b66f235 100644 --- a/packages/react/react/tsconfig.json +++ b/packages/react/react/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../dist/packages", "types": [ "../../env.d.ts", diff --git a/packages/react/test-utils/.eslintrc.json b/packages/react/test-utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/react/test-utils/.eslintrc.json +++ b/packages/react/test-utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/react/test-utils/package.json b/packages/react/test-utils/package.json index 815eb2a1..3d9e4b43 100644 --- a/packages/react/test-utils/package.json +++ b/packages/react/test-utils/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/react/use-strict-lifecycle/.eslintrc.json b/packages/react/use-strict-lifecycle/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/react/use-strict-lifecycle/.eslintrc.json +++ b/packages/react/use-strict-lifecycle/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/react/use-strict-lifecycle/package.json b/packages/react/use-strict-lifecycle/package.json index 50c14a09..90d0e61f 100644 --- a/packages/react/use-strict-lifecycle/package.json +++ b/packages/react/use-strict-lifecycle/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/react/use-strict-lifecycle/tests/.eslintrc.json b/packages/react/use-strict-lifecycle/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/react/use-strict-lifecycle/tests/.eslintrc.json +++ b/packages/react/use-strict-lifecycle/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/react/use-strict-lifecycle/tests/package.json b/packages/react/use-strict-lifecycle/tests/package.json index 0bb833a4..966f81d9 100644 --- a/packages/react/use-strict-lifecycle/tests/package.json +++ b/packages/react/use-strict-lifecycle/tests/package.json @@ -1,25 +1,25 @@ { + "private": true, + "name": "@starbeam-tests/react-use-strict-lifecycle", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/react-test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/use-strict-lifecycle": "workspace:^", + "@starbeam-workspace/react-test-utils": "workspace:^", "react": "18.2.0" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^", "@types/react": "^18.2.22", "jsdom": "^22.1.0" - }, - "name": "@starbeam-tests/react-use-strict-lifecycle", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/react/use-strict-lifecycle/tests/tsconfig.json b/packages/react/use-strict-lifecycle/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/react/use-strict-lifecycle/tests/tsconfig.json +++ b/packages/react/use-strict-lifecycle/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/react/use-strict-lifecycle/tests/use-lifecycle.spec.ts b/packages/react/use-strict-lifecycle/tests/use-lifecycle.spec.ts index 9af96cd2..2958004a 100644 --- a/packages/react/use-strict-lifecycle/tests/use-lifecycle.spec.ts +++ b/packages/react/use-strict-lifecycle/tests/use-lifecycle.spec.ts @@ -36,7 +36,7 @@ testReact( }); return resource; - } + }, ); setup.value({ @@ -56,9 +56,9 @@ testReact( setCount(count + 1); }, }, - "++" - ) - ) + "++", + ), + ), ); }); @@ -70,7 +70,7 @@ testReact( strict: () => "updated", loose: () => "idle", }), - 0 + 0, ); await result.rerender(); @@ -84,7 +84,7 @@ testReact( await result.unmount(); resource.assert("unmounted", 1); - } + }, ); testReact("most basic useLifecycle", async (root) => { @@ -134,8 +134,8 @@ testReact("useLifecycle with update", async (root) => { setCount((i) => i + 1); }, }, - "++" - ) + "++", + ), ); }); @@ -178,8 +178,8 @@ testReact( setCount((i) => i + 1); }, }, - "++" - ) + "++", + ), ); }); @@ -190,7 +190,7 @@ testReact( await result.unmount(); expect(result.value).toEqual({ count: 1, cleanup: 1 }); - } + }, ); testReact( @@ -223,7 +223,7 @@ testReact( setup.value(object); return object; - } + }, ); return react.fragment( @@ -234,8 +234,8 @@ testReact( setCount((i) => i + 1); }, }, - "++" - ) + "++", + ), ); }); @@ -253,7 +253,7 @@ testReact( await result.unmount(); expect(result.value).toEqual({ count: 1, cleanup: initialCleanup + 1 }); - } + }, ); testReact( @@ -263,7 +263,7 @@ testReact( .expectStable() .expectHTML( ({ count }) => - `
${count}
` + `
${count}
`, ) .render((setup) => { const [count, setCount] = useState(0); @@ -303,7 +303,7 @@ testReact( setCount((i) => i + 1); }, }, - "++" + "++", ), html.button( { @@ -311,8 +311,8 @@ testReact( setCleanup({}); }, }, - "cleanup" - ) + "cleanup", + ), ); }); @@ -339,228 +339,9 @@ testReact( await result.unmount(); expect(result.value).toEqual({ count: 2, cleanup: initialCleanup + 2 }); - } + }, ); -// testReact("useResource (no argument)", async (mode) => { -// TestResource.resetId(); - -// const result = mode -// .test(() => { -// const [, setNotify] = useState({}); - -// const test = useLifecycle((resource) => { -// const test = TestResource.initial(0); - -// resource.on.update(() => test.transition("updated")); -// resource.on.layout(() => test.transition("layout")); -// resource.on.idle(() => test.transition("idle")); -// resource.on.cleanup(() => test.transition("unmounted")); - -// return test; -// }); - -// return { -// value: test, -// dom: react.fragment( -// html.p(test.state), -// html.p(test.id), -// html.label( -// html.span("Notify"), -// html.button({ onClick: () => setNotify({}) }, "setNotify({})") -// ) -// ), -// }; -// }) -// .expectStableValue() -// .expectHTML( -// (value) => -// `

${value.state}

${String( -// value.id -// )}

` -// ); - -// const resource = result.value; - -// // strict mode runs initial render twice and *then* unmounts and remounts the component, which -// // results in the resource getting create three times. -// const expectedId = mode.match({ -// strict: () => 3, -// loose: () => 1, -// }); - -// expect(resource.id).toBe(expectedId); - -// resource.assert( -// mode.match({ -// // strict mode runs initial render twice -// strict: () => "updated", -// loose: () => "idle", -// }), -// 0 -// ); - -// result.rerender(); -// resource.assert("updated", 0, expectedId); - -// await result.find("button").fire.click(); -// resource.assert("updated", 0, expectedId); - -// result.rerender(); -// resource.assert("updated", 0, expectedId); - -// result.unmount(); -// resource.assert("unmounted", 0, expectedId); -// }); - -// testReact("useResource (nested)", async (mode) => { -// TestResource.resetId(); - -// const result = mode -// .test(() => { -// const [count, setCount] = useState(0); - -// const test = useLifecycle(count, (resource, count) => { -// const test = TestResource.initial(count); - -// resource.on.update((count) => test.transition("updated", count)); -// resource.on.layout(() => test.transition("layout")); -// resource.on.idle(() => test.transition("idle")); -// resource.on.cleanup(() => test.transition("unmounted")); - -// return test; -// }); - -// return { -// value: test, -// dom: react.fragment( -// react.render(ChildComponent, { count: test }), -// html.p(count), -// html.label( -// html.span("Increment"), -// html.button({ onClick: () => setCount(count + 1) }, "++") -// ) -// ), -// }; -// }) -// .expectStableValue() -// .expectHTML( -// ({ state, count }) => -// `

${state}

${count}

` -// ); - -// function ChildComponent({ count }: { count: TestResource }) { -// return html.p(count.state); -// } - -// const resource = result.value; - -// resource.assert( -// mode.match({ -// strict: () => "updated", -// loose: () => "idle", -// }), -// 0 -// ); - -// result.rerender(); -// resource.assert("updated", 0); - -// await result.find("button").fire.click(); -// resource.assert("updated", 1); - -// result.rerender(); -// resource.assert("updated", 1); - -// result.unmount(); -// resource.assert("unmounted", 1); -// }); - -// testReact( -// "useResource (nested, stability across remounting)", -// async (mode) => { -// TestResource.resetId(); - -// const result = mode -// .test(() => { -// const [count, setCount] = useState(0); - -// const test = useLifecycle(count, (resource, count) => { -// const test = TestResource.initial(count); - -// resource.on.update((count) => test.transition("updated", count)); -// resource.on.layout(() => test.transition("layout")); -// resource.on.idle(() => test.transition("idle")); -// resource.on.cleanup(() => test.transition("unmounted")); - -// return test; -// }); - -// return { -// value: test, -// dom: react.fragment( -// html.p(test.state), -// html.p("parent:", count), -// react.render(ChildComponent, { -// count: test, -// increment: () => setCount(count + 1), -// }) -// ), -// }; -// }) -// .expectStableValue() -// .expectStable((value) => value) -// .expectHTML( -// ({ state, count, id }) => -// `

${state}

parent:${count}

child:${count} id:${String( -// id -// )}

` -// ); - -// function ChildComponent({ -// count, -// increment, -// }: { -// count: TestResource; -// increment: () => void; -// }) { -// return react.fragment( -// // verify that the child sees the same TestResource as the parent -// html.p("child:", count.count, " ", "id:", count.id), - -// html.label( -// html.span("Increment"), -// html.button({ onClick: () => increment() }, "++") -// ) -// ); -// } - -// // const resource = result.value; - -// // const stableId = mode.match({ strict: () => 3, loose: () => 1 }); - -// // resource.assert( -// // mode.match({ -// // strict: () => "updated", -// // loose: () => "idle", -// // }), -// // 0 -// // ); - -// // result.rerender(); -// // resource.assert("updated", 0, stableId); - -// // await result.find("button").fire.click(); -// // resource.assert("updated", 1, stableId); - -// // result.rerender(); -// // resource.assert("updated", 1, stableId); - -// // result.unmount(); -// // resource.assert("unmounted", 1, stableId); -// } -// ); - let nextId = 0; class TestResource { diff --git a/packages/universal/collections/.eslintrc.json b/packages/universal/collections/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/collections/.eslintrc.json +++ b/packages/universal/collections/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/collections/package.json b/packages/universal/collections/package.json index 18abe0fb..0f15bfab 100644 --- a/packages/universal/collections/package.json +++ b/packages/universal/collections/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/collections/src/decorator.ts b/packages/universal/collections/src/decorator.ts index 0d15945b..235f74ef 100644 --- a/packages/universal/collections/src/decorator.ts +++ b/packages/universal/collections/src/decorator.ts @@ -7,8 +7,6 @@ export const cached = ( // eslint-disable-next-line @typescript-eslint/no-explicit-any descriptor: TypedPropertyDescriptor, ): void => { - // const { get, enumerable = true, configurable = true } = descriptor; - const get = descriptor.get; verify( diff --git a/packages/universal/collections/tests/.eslintrc.json b/packages/universal/collections/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/collections/tests/.eslintrc.json +++ b/packages/universal/collections/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/collections/tests/array.spec.ts b/packages/universal/collections/tests/array.spec.ts index c5266df2..f044df8b 100644 --- a/packages/universal/collections/tests/array.spec.ts +++ b/packages/universal/collections/tests/array.spec.ts @@ -4,8 +4,6 @@ import { describe, expect, test } from "vitest"; import { Invalidation } from "./support.js"; -// import { Invalidation } from "./support.js"; - describe("TrackedArray", () => { test("adding and deleting items updates the size", () => { const array = reactive.array([]); diff --git a/packages/universal/collections/tests/object.spec.ts b/packages/universal/collections/tests/object.spec.ts index f1dd0aca..13e62001 100644 --- a/packages/universal/collections/tests/object.spec.ts +++ b/packages/universal/collections/tests/object.spec.ts @@ -10,7 +10,7 @@ describe("TrackedObject", () => { const size = CachedFormula(() => Object.keys(object).length); const described = CachedFormula( - () => `The object has ${size.current} items` + () => `The object has ${size.current} items`, ); const isEmpty = CachedFormula(() => size.current === 0); @@ -43,7 +43,7 @@ describe("TrackedObject", () => { const object = reactive.object>({}); const delicious = Invalidation.trace( - () => "brie" in object || "chevre" in object + () => "brie" in object || "chevre" in object, ); expect(delicious.state).toEqual([false, "initialized"]); @@ -136,7 +136,7 @@ describe("TrackedObject", () => { const object = reactive.object>({}); const delicious = Invalidation.trace( - () => "brie" in object || "chevre" in object + () => "brie" in object || "chevre" in object, ); expect(delicious.state).toEqual([false, "initialized"]); @@ -148,25 +148,5 @@ describe("TrackedObject", () => { object["chevre"] = "chevre"; expect(object).toEqual({ "hot dogs": "hot dogs", chevre: "chevre" }); expect(delicious.state).toEqual([true, "invalidated"]); - - // object["chevre"] = "chevre"; - // expect(object).toEqual({ - // "hot dogs": "hot dogs", - // brie: "brie", - // chevre: "chevre", - // }); - // expect(delicious.state).toEqual([true, "stable"]); - - // delete object["brie"]; - // expect(object).toEqual({ "hot dogs": "hot dogs", chevre: "chevre" }); - // expect(delicious.state).toEqual([true, "invalidated"]); - - // delete object["chevre"]; - // expect(object).toEqual({ "hot dogs": "hot dogs" }); - // expect(delicious.state).toEqual([false, "invalidated"]); - - // delete object["hot dogs"]; - // expect(object).toEqual({}); - // expect(delicious.state).toEqual([false, "stable"]); }); }); diff --git a/packages/universal/collections/tests/package.json b/packages/universal/collections/tests/package.json index fb10f566..f3f69595 100644 --- a/packages/universal/collections/tests/package.json +++ b/packages/universal/collections/tests/package.json @@ -1,22 +1,22 @@ { - "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam/collections": "workspace:^", - "@starbeam/universal": "workspace:^" - }, - "devDependencies": { - "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/collections", "private": true, + "name": "@starbeam-tests/collections", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, "scripts": { "test:lint": "eslint . --max-warnings 0", "test:types": "tsc -b" }, - "starbeam": { - "source": "tsx", - "type": "tests" + "dependencies": { + "@starbeam/collections": "workspace:^", + "@starbeam/universal": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, - "type": "module", - "version": "1.0.0" + "devDependencies": { + "@starbeam/eslint-plugin": "workspace:^" + } } diff --git a/packages/universal/collections/tests/tsconfig.json b/packages/universal/collections/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/collections/tests/tsconfig.json +++ b/packages/universal/collections/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/core-utils/.eslintrc.json b/packages/universal/core-utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/core-utils/.eslintrc.json +++ b/packages/universal/core-utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/core-utils/package.json b/packages/universal/core-utils/package.json index 2b902e84..03e3be31 100644 --- a/packages/universal/core-utils/package.json +++ b/packages/universal/core-utils/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/core-utils/tests/.eslintrc.json b/packages/universal/core-utils/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/core-utils/tests/.eslintrc.json +++ b/packages/universal/core-utils/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/core-utils/tests/package.json b/packages/universal/core-utils/tests/package.json index 84074c45..c595b140 100644 --- a/packages/universal/core-utils/tests/package.json +++ b/packages/universal/core-utils/tests/package.json @@ -1,20 +1,20 @@ { - "dependencies": { - "@starbeam/core-utils": "workspace:^" - }, - "devDependencies": { - "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/core-utils", "private": true, + "name": "@starbeam-tests/core-utils", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, "scripts": { "test:lint": "eslint . --max-warnings 0", "test:types": "tsc -b" }, - "starbeam": { - "source": "tsx", - "type": "tests" + "dependencies": { + "@starbeam/core-utils": "workspace:^" }, - "type": "module", - "version": "1.0.0" + "devDependencies": { + "@starbeam/eslint-plugin": "workspace:^" + } } diff --git a/packages/universal/core-utils/tests/tsconfig.json b/packages/universal/core-utils/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/core-utils/tests/tsconfig.json +++ b/packages/universal/core-utils/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/core/.eslintrc.json b/packages/universal/core/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/core/.eslintrc.json +++ b/packages/universal/core/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/core/package.json b/packages/universal/core/package.json index 321a09a0..9cd1e3f4 100644 --- a/packages/universal/core/package.json +++ b/packages/universal/core/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/debug/.eslintrc.json b/packages/universal/debug/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/debug/.eslintrc.json +++ b/packages/universal/debug/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/debug/package.json b/packages/universal/debug/package.json index 8c64b9f6..85773dbf 100644 --- a/packages/universal/debug/package.json +++ b/packages/universal/debug/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/debug/src/call-stack/debug/module.ts b/packages/universal/debug/src/call-stack/debug/module.ts index 71b9466e..1334b1da 100644 --- a/packages/universal/debug/src/call-stack/debug/module.ts +++ b/packages/universal/debug/src/call-stack/debug/module.ts @@ -7,23 +7,6 @@ const _RELATIVE_MODULE = /^\.{1,2}\//; export function parseModule(filename: string, codebase?: string): ParsedModule { return normalizeModule(filename, codebase); - - // FIXME:: Do we want/need to support package inference? If so, how should it work? - - // if (RELATIVE_MODULE.exec(filename)) - - // const groups = SOURCE_PARTS.exec(filename)?.groups; - - // if (groups === undefined) return normalizeModule(filename, codebase); - - // return { - // root: { - // type: "package", - // scope: groups["scope"], - // name: verified(groups["name"], isPresent), - // }, - // path: verified(groups["path"], isPresent), - // }; } export interface ParsedModule { @@ -33,7 +16,7 @@ export interface ParsedModule { export function normalizeModule( filename: string, - codebase?: string | undefined + codebase?: string | undefined, ): ParsedModule { const path = normalizePath(filename); @@ -73,7 +56,7 @@ function normalizePath(...pathParts: (string | null | undefined)[]): string { */ export function pivotPath( source: string, - target: string + target: string, ): { prefix: string; suffix: string } { const sourceParts = source.split("/"); const targetParts = target.split("/"); @@ -102,13 +85,13 @@ if (import.meta.vitest) { test("should find the pivot path", () => { expect( - normalizeModule("/src/app/index.ts", "/src/app/some/nested/file.ts") + normalizeModule("/src/app/index.ts", "/src/app/some/nested/file.ts"), ).toStrictEqual({ root: "/src/app/", path: "index.ts", }); expect( - parseModule("/src/app/index.ts", "/src/app/some/nested/file.ts") + parseModule("/src/app/index.ts", "/src/app/some/nested/file.ts"), ).toStrictEqual({ root: "/src/app/", path: "index.ts", diff --git a/packages/universal/debug/tests/.eslintrc.json b/packages/universal/debug/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/debug/tests/.eslintrc.json +++ b/packages/universal/debug/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/debug/tests/package.json b/packages/universal/debug/tests/package.json index e6925df8..88060f57 100644 --- a/packages/universal/debug/tests/package.json +++ b/packages/universal/debug/tests/package.json @@ -1,21 +1,21 @@ { - "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam/debug": "workspace:^" - }, - "devDependencies": { - "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/debug", "private": true, + "name": "@starbeam-tests/debug", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, "scripts": { "test:lint": "eslint . --max-warnings 0", "test:types": "tsc -b" }, - "starbeam": { - "source": "tsx", - "type": "tests" + "dependencies": { + "@starbeam/debug": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, - "type": "module", - "version": "1.0.0" + "devDependencies": { + "@starbeam/eslint-plugin": "workspace:^" + } } diff --git a/packages/universal/debug/tests/tsconfig.json b/packages/universal/debug/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/debug/tests/tsconfig.json +++ b/packages/universal/debug/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/interfaces/.eslintrc.json b/packages/universal/interfaces/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/interfaces/.eslintrc.json +++ b/packages/universal/interfaces/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/interfaces/package.json b/packages/universal/interfaces/package.json index e90cf17e..4da01683 100644 --- a/packages/universal/interfaces/package.json +++ b/packages/universal/interfaces/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/interfaces/tsconfig.json b/packages/universal/interfaces/tsconfig.json index fd0fc900..378c6bb9 100644 --- a/packages/universal/interfaces/tsconfig.json +++ b/packages/universal/interfaces/tsconfig.json @@ -15,6 +15,6 @@ "../../env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "./src/**/*.ts", "./src/**/*.d.ts"] + "include": ["index.ts", "./src/**/*.ts", "./src/**/*.d.ts"], + "exclude": ["dist/**/*"] } diff --git a/packages/universal/modifier/.eslintrc.json b/packages/universal/modifier/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/modifier/.eslintrc.json +++ b/packages/universal/modifier/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/modifier/package.json b/packages/universal/modifier/package.json index 9df0f51f..a63ae17a 100644 --- a/packages/universal/modifier/package.json +++ b/packages/universal/modifier/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/modifier/src/modifier.ts b/packages/universal/modifier/src/modifier.ts index 6cc44f76..3528b0d4 100644 --- a/packages/universal/modifier/src/modifier.ts +++ b/packages/universal/modifier/src/modifier.ts @@ -7,13 +7,11 @@ import { Cell } from "@starbeam/universal"; import { expected, isPresent, verified, verify } from "@starbeam/verify"; export type ElementType = abstract new < - Args extends unknown[] + Args extends unknown[], >( ...args: Args ) => E; -// export type Ref = Initializable; - export interface ElementPlaceholder extends Tagged { readonly initialize: (value: E) => void; readonly current: E | null; @@ -23,14 +21,14 @@ const REFS = new WeakMap>(); export function ElementPlaceholder( type: ElementType, - description: Description | undefined + description: Description | undefined, ): ElementPlaceholder { const ref = Object.create(null) as object; const elementCell = Cell(UNINITIALIZED, { description: description?.implementation( "cell", "element", - "ref placeholder" + "ref placeholder", ), }); @@ -39,7 +37,7 @@ export function ElementPlaceholder( return { [TAG]: initializeFormulaTag( description, - () => new Set([getTag(elementCell)]) + () => new Set([getTag(elementCell)]), ), initialize(value: anydom.Element): void { @@ -49,7 +47,7 @@ export function ElementPlaceholder( (anyElement): anyElement is E => anyElement instanceof type, expected(`A ref (${describe(description)})`) .toBe(`initialized with an instance of ${type.name}`) - .butGot(() => `an instance of ${value.constructor.name}`) + .butGot(() => `an instance of ${value.constructor.name}`), ); element.set(value); element.freeze(); diff --git a/packages/universal/reactive/.eslintrc.json b/packages/universal/reactive/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/reactive/.eslintrc.json +++ b/packages/universal/reactive/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/reactive/package.json b/packages/universal/reactive/package.json index 608b53ec..31b41107 100644 --- a/packages/universal/reactive/package.json +++ b/packages/universal/reactive/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/reactive/tests/.eslintrc.json b/packages/universal/reactive/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/reactive/tests/.eslintrc.json +++ b/packages/universal/reactive/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/reactive/tests/package.json b/packages/universal/reactive/tests/package.json index 8461d324..194e0eed 100644 --- a/packages/universal/reactive/tests/package.json +++ b/packages/universal/reactive/tests/package.json @@ -1,25 +1,25 @@ { + "private": true, + "name": "@starbeam-tests/reactive", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/interfaces": "workspace:^", "@starbeam/reactive": "workspace:^", "@starbeam/runtime": "workspace:^", - "@starbeam/shared": "workspace:^" + "@starbeam/shared": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/reactive", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/universal/reactive/tests/tsconfig.json b/packages/universal/reactive/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/reactive/tests/tsconfig.json +++ b/packages/universal/reactive/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/renderer/.eslintrc.json b/packages/universal/renderer/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/renderer/.eslintrc.json +++ b/packages/universal/renderer/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/renderer/package.json b/packages/universal/renderer/package.json index 729927d1..511ecdf3 100644 --- a/packages/universal/renderer/package.json +++ b/packages/universal/renderer/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/renderer/tests/.eslintrc.json b/packages/universal/renderer/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/renderer/tests/.eslintrc.json +++ b/packages/universal/renderer/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/renderer/tests/package.json b/packages/universal/renderer/tests/package.json index 49b9f0b6..b1c69ddd 100644 --- a/packages/universal/renderer/tests/package.json +++ b/packages/universal/renderer/tests/package.json @@ -1,21 +1,21 @@ { - "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam/renderer": "workspace:^" - }, - "devDependencies": { - "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/renderer", "private": true, + "name": "@starbeam-tests/renderer", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, "scripts": { "test:lint": "eslint . --max-warnings 0", "test:types": "tsc -b" }, - "starbeam": { - "source": "tsx", - "type": "tests" + "dependencies": { + "@starbeam/renderer": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, - "type": "module", - "version": "1.0.0" + "devDependencies": { + "@starbeam/eslint-plugin": "workspace:^" + } } diff --git a/packages/universal/renderer/tests/tsconfig.json b/packages/universal/renderer/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/renderer/tests/tsconfig.json +++ b/packages/universal/renderer/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/resource/.eslintrc.json b/packages/universal/resource/.eslintrc.json index 76aa0b80..e8f35ae3 100644 --- a/packages/universal/resource/.eslintrc.json +++ b/packages/universal/resource/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/resource/package.json b/packages/universal/resource/package.json index 71272d71..e9db3f2a 100644 --- a/packages/universal/resource/package.json +++ b/packages/universal/resource/package.json @@ -8,11 +8,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/resource/tests/.eslintrc.json b/packages/universal/resource/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/resource/tests/.eslintrc.json +++ b/packages/universal/resource/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/resource/tests/package.json b/packages/universal/resource/tests/package.json index d6573ba7..cc6b3e16 100644 --- a/packages/universal/resource/tests/package.json +++ b/packages/universal/resource/tests/package.json @@ -1,27 +1,27 @@ { + "private": true, + "name": "@starbeam-tests/resource", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/collections": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/interfaces": "workspace:^", "@starbeam/reactive": "workspace:^", "@starbeam/resource": "workspace:^", "@starbeam/runtime": "workspace:^", - "@starbeam/shared": "workspace:^" + "@starbeam/shared": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/resource", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/universal/resource/tests/resource.spec.ts b/packages/universal/resource/tests/resource.spec.ts index 5b65c7b2..84fcc0b7 100644 --- a/packages/universal/resource/tests/resource.spec.ts +++ b/packages/universal/resource/tests/resource.spec.ts @@ -186,143 +186,6 @@ describe("resources", () => { }); }); - // test("the basics", () => { - // const events = new Actions(); - // const testResource = new TestResource(events); - // events.expect("init"); - - // events.expect([]); - // testResource.sync().expect("setup"); - - // testResource.invalidateSetup(); - // testResource.sync().expect("cleanup", "setup"); - // expect(testResource.count).toBe(0); - - // testResource.value.increment(); - // events.expect([]); - // expect(testResource.count).toBe(1); - - // testResource.invalidateSetup(); - // testResource.sync().expect("cleanup", "setup"); - // // the resource's state hasn't changed - // expect(testResource.count).toBe(1); - - // testResource.value.increment(); - // events.expect([]); - // expect(testResource.count).toBe(2); - - // testResource.finalize(); - // expect(testResource.count).toBe(2); - - // testResource.finalize({ expect: "noop" }); - // expect(testResource.count).toBe(2); - - // // this won't do anything because the `increment` method emulates a resource - // // whose updates are happening via the process set up in `setup`. - // testResource.value.increment(); - // events.expect([]); - // expect(testResource.count).toBe(2); - - // testResource.finalize({ expect: "noop" }); - // expect(testResource.count).toBe(2); - // events.expect([]); - // }); - - // test("on.cleanup only runs when the resource is finally cleaned up", () => { - // const events = new Actions(); - // const invalidate = Marker(); - - // const TestResource = Resource(({ on }) => { - // events.record("init"); - // const cell = Cell(0); - - // on.finalize(() => { - // events.record("finalize"); - // }); - - // on.setup(() => { - // events.record("setup"); - // invalidate.read(); - // cell.current++; - - // return () => { - // events.record("cleanup"); - // }; - // }); - - // return cell; - // }); - - // const resource = ResourceWrapper.use(TestResource, events); - // events.expect("init"); - - // const { value, sync, finalize } = resource; - // expect(value.current).toBe(0); - - // sync().expect("setup"); - // expect(value.current).toBe(1); - - // sync().expect([]); - // expect(value.current).toBe(1); - - // invalidate.mark(); - // events.expect([]); - // expect(value.current, "the value before sync has occurred").toBe(1); - // sync().expect("cleanup", "setup"); - - // invalidate.mark(); - // events.expect([]); - // expect(value.current, "the value after sync has occurred").toBe(2); - // sync().expect("cleanup", "setup"); - - // finalize({ afterActions: ["finalize"] }); - // }); - - // test("if a resource constructor returns a reactive value, it is assimilated", () => { - // const events = new Actions(); - // const initial = Cell(0); - // const plus = Cell(0); - // const Test = Resource(({ on }) => { - // events.record("init"); - // const cell = Cell(initial.current); - - // on.setup(() => { - // events.record("setup"); - // cell.current = initial.current; - - // return () => void events.record("cleanup"); - // }); - - // return CachedFormula(() => cell.current + plus.current); - // }); - - // const resource = ResourceWrapper.use(Test, events); - // const { value, sync, finalize } = resource; - - // events.expect("init"); - - // plus.current++; - // expect(value.current).toBe(1); - // events.expect([]); - - // sync().expect("setup"); - - // initial.current++; - // expect(value.current, "the value before sync has occurred").toBe(1); - // sync().expect("cleanup", "setup"); - // expect(value.current, "the value after sync has occurred").toBe(2); - - // finalize(); - // expect(value.current, "the value after finalize has occurred").toBe(2); - - // // synchronizing after finalization doesn't run setups again - // sync().expect([]); - // // the value remains stable - // expect(value.current, "the value after sync has occurred").toBe(2); - - // finalize({ expect: "noop" }); - // }); - test("a counter that persists across cleanups", () => { const events = new RecordedEvents(); const invalidateSync = Marker(); diff --git a/packages/universal/resource/tests/tsconfig.json b/packages/universal/resource/tests/tsconfig.json index 19f30be4..3faa7dbf 100644 --- a/packages/universal/resource/tests/tsconfig.json +++ b/packages/universal/resource/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", @@ -17,6 +17,6 @@ "../../../env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["dist/**/*"] } diff --git a/packages/universal/runtime/.eslintrc.json b/packages/universal/runtime/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/runtime/.eslintrc.json +++ b/packages/universal/runtime/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/runtime/package.json b/packages/universal/runtime/package.json index 3ba02863..cf4f53d5 100644 --- a/packages/universal/runtime/package.json +++ b/packages/universal/runtime/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/runtime/tests/.eslintrc.json b/packages/universal/runtime/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/runtime/tests/.eslintrc.json +++ b/packages/universal/runtime/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/runtime/tests/package.json b/packages/universal/runtime/tests/package.json index fd50f716..bab02cf6 100644 --- a/packages/universal/runtime/tests/package.json +++ b/packages/universal/runtime/tests/package.json @@ -1,25 +1,25 @@ { + "private": true, + "name": "@starbeam-tests/runtime", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/interfaces": "workspace:^", "@starbeam/reactive": "workspace:^", "@starbeam/runtime": "workspace:^", - "@starbeam/shared": "workspace:^" + "@starbeam/shared": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/runtime", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/universal/runtime/tests/tsconfig.json b/packages/universal/runtime/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/runtime/tests/tsconfig.json +++ b/packages/universal/runtime/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/service/.eslintrc.json b/packages/universal/service/.eslintrc.json index 76aa0b80..e8f35ae3 100644 --- a/packages/universal/service/.eslintrc.json +++ b/packages/universal/service/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/service/package.json b/packages/universal/service/package.json index a6536932..f593785c 100644 --- a/packages/universal/service/package.json +++ b/packages/universal/service/package.json @@ -8,11 +8,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/service/tests/.eslintrc.json b/packages/universal/service/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/service/tests/.eslintrc.json +++ b/packages/universal/service/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/service/tests/package.json b/packages/universal/service/tests/package.json index 2248d820..eeb66648 100644 --- a/packages/universal/service/tests/package.json +++ b/packages/universal/service/tests/package.json @@ -1,6 +1,17 @@ { + "private": true, + "name": "@starbeam-tests/service", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/collections": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/interfaces": "workspace:^", @@ -8,21 +19,10 @@ "@starbeam/resource": "workspace:^", "@starbeam/runtime": "workspace:^", "@starbeam/service": "workspace:^", - "@starbeam/shared": "workspace:^" + "@starbeam/shared": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/service", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/universal/service/tests/tsconfig.json b/packages/universal/service/tests/tsconfig.json index 19f30be4..3faa7dbf 100644 --- a/packages/universal/service/tests/tsconfig.json +++ b/packages/universal/service/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", @@ -17,6 +17,6 @@ "../../../env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["dist/**/*"] } diff --git a/packages/universal/shared/.eslintrc.json b/packages/universal/shared/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/shared/.eslintrc.json +++ b/packages/universal/shared/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/shared/package.json b/packages/universal/shared/package.json index b1cd081b..d69255d2 100644 --- a/packages/universal/shared/package.json +++ b/packages/universal/shared/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/shared/tests/.eslintrc.json b/packages/universal/shared/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/shared/tests/.eslintrc.json +++ b/packages/universal/shared/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/shared/tests/package.json b/packages/universal/shared/tests/package.json index b41e4c00..d0da5289 100644 --- a/packages/universal/shared/tests/package.json +++ b/packages/universal/shared/tests/package.json @@ -1,7 +1,19 @@ { + "private": true, + "name": "@starbeam-tests/shared", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", "@starbeam/shared": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", "@types/stack-utils": "^2.0.1", "@vitest/utils": "^0.34.4", "stack-utils": "^2.0.6", @@ -9,17 +21,5 @@ }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/shared", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/universal/shared/tests/tsconfig.json b/packages/universal/shared/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/shared/tests/tsconfig.json +++ b/packages/universal/shared/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/universal/shared/tsconfig.json b/packages/universal/shared/tsconfig.json index 7ae2faee..9262a99a 100644 --- a/packages/universal/shared/tsconfig.json +++ b/packages/universal/shared/tsconfig.json @@ -15,6 +15,6 @@ "../../env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["index.ts", "src/**/*.ts", "rollup.config.mjs"] + "include": ["index.ts", "src/**/*.ts", "rollup.config.mjs"], + "exclude": ["dist/**/*"] } diff --git a/packages/universal/tags/.eslintrc.json b/packages/universal/tags/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/tags/.eslintrc.json +++ b/packages/universal/tags/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/tags/package.json b/packages/universal/tags/package.json index 182e9ed7..1853d779 100644 --- a/packages/universal/tags/package.json +++ b/packages/universal/tags/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/universal/.eslintrc.json b/packages/universal/universal/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/universal/.eslintrc.json +++ b/packages/universal/universal/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/universal/package.json b/packages/universal/universal/package.json index 44ba35ec..c4331bb8 100644 --- a/packages/universal/universal/package.json +++ b/packages/universal/universal/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/universal/tests/.eslintrc.json b/packages/universal/universal/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/universal/universal/tests/.eslintrc.json +++ b/packages/universal/universal/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/universal/universal/tests/package.json b/packages/universal/universal/tests/package.json index f7d758bc..80d8c6b4 100644 --- a/packages/universal/universal/tests/package.json +++ b/packages/universal/universal/tests/package.json @@ -1,4 +1,16 @@ { + "private": true, + "name": "@starbeam-tests/universal", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { "@starbeam/collections": "workspace:^", "@starbeam/debug": "workspace:^", @@ -7,19 +19,7 @@ "@starbeam/universal": "workspace:^" }, "devDependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/universal", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + "@starbeam/eslint-plugin": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" + } } diff --git a/packages/universal/universal/tests/tsconfig.json b/packages/universal/universal/tests/tsconfig.json index 19f30be4..3faa7dbf 100644 --- a/packages/universal/universal/tests/tsconfig.json +++ b/packages/universal/universal/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", @@ -17,6 +17,6 @@ "../../../env.d.ts" ] }, - "exclude": ["dist/**/*"], - "include": ["**/*.ts"] + "include": ["**/*.ts"], + "exclude": ["dist/**/*"] } diff --git a/packages/universal/verify/.eslintrc.json b/packages/universal/verify/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/universal/verify/.eslintrc.json +++ b/packages/universal/verify/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/universal/verify/package.json b/packages/universal/verify/package.json index 1429fcd0..cae497f0 100644 --- a/packages/universal/verify/package.json +++ b/packages/universal/verify/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/universal/verify/tests/tsconfig.json b/packages/universal/verify/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/universal/verify/tests/tsconfig.json +++ b/packages/universal/verify/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/vue/vue-testing-utils/.eslintrc.json b/packages/vue/vue-testing-utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/vue/vue-testing-utils/.eslintrc.json +++ b/packages/vue/vue-testing-utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/vue/vue-testing-utils/package.json b/packages/vue/vue-testing-utils/package.json index 660b97d2..ae9141bf 100644 --- a/packages/vue/vue-testing-utils/package.json +++ b/packages/vue/vue-testing-utils/package.json @@ -5,11 +5,9 @@ "type": "module", "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/vue/vue-testing-utils/tests/.eslintrc.json b/packages/vue/vue-testing-utils/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/vue/vue-testing-utils/tests/.eslintrc.json +++ b/packages/vue/vue-testing-utils/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/vue/vue-testing-utils/tests/package.json b/packages/vue/vue-testing-utils/tests/package.json index 32617e4c..9f893bfd 100644 --- a/packages/vue/vue-testing-utils/tests/package.json +++ b/packages/vue/vue-testing-utils/tests/package.json @@ -1,7 +1,17 @@ { + "private": true, + "name": "@starbeam-tests/vue-testing-utils", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam-workspace/vue-testing-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/interfaces": "workspace:^", "@starbeam/preact": "workspace:^", @@ -9,6 +19,8 @@ "@starbeam/shared": "workspace:^", "@starbeam/universal": "workspace:^", "@starbeam/vue": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", + "@starbeam-workspace/vue-testing-utils": "workspace:^", "@testing-library/dom": "^9.2.0", "@testing-library/vue": "^7.0.0", "htm": "^3.1.1", @@ -20,17 +32,5 @@ "@vue/shared": "^3.3.4", "preact-render-to-string": "^6.2.1", "vue": "^3.3.4" - }, - "name": "@starbeam-tests/vue-testing-utils", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/vue/vue-testing-utils/tests/tsconfig.json b/packages/vue/vue-testing-utils/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/vue/vue-testing-utils/tests/tsconfig.json +++ b/packages/vue/vue-testing-utils/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/vue/vue/.eslintrc.json b/packages/vue/vue/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/vue/vue/.eslintrc.json +++ b/packages/vue/vue/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/vue/vue/package.json b/packages/vue/vue/package.json index 8145b535..72876aa9 100644 --- a/packages/vue/vue/package.json +++ b/packages/vue/vue/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/vue/vue/tests/.eslintrc.json b/packages/vue/vue/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/vue/vue/tests/.eslintrc.json +++ b/packages/vue/vue/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/vue/vue/tests/create.spec.ts b/packages/vue/vue/tests/create.spec.ts index 54e1c9c2..2ac438b5 100644 --- a/packages/vue/vue/tests/create.spec.ts +++ b/packages/vue/vue/tests/create.spec.ts @@ -88,31 +88,3 @@ function ReactiveObject(events: RecordedEvents): () => Counter { }; }; } - -// const ReactiveObject = Resource((): Counter => { -// const cell = Cell(INITIAL_COUNT); - -// const increment = () => { -// return cell.set(cell.current + INCREMENT); -// }; - -// return { -// get count() { -// return cell.current; -// }, - -// increment, -// }; -// }); - -// function ReactiveObject(): { cell: Cell; increment: () => void } { -// const cell = Cell(INITIAL_COUNT, { -// description: `ReactiveObject #${++nextId}`, -// }); - -// function increment(): void { -// cell.set(cell.current + INCREMENT); -// } - -// return { cell, increment }; -// } diff --git a/packages/vue/vue/tests/package.json b/packages/vue/vue/tests/package.json index 4fb76491..dc487df1 100644 --- a/packages/vue/vue/tests/package.json +++ b/packages/vue/vue/tests/package.json @@ -1,13 +1,25 @@ { + "private": true, + "name": "@starbeam-tests/vue", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam-workspace/vue-testing-utils": "workspace:^", "@starbeam/debug": "workspace:^", "@starbeam/resource": "workspace:^", "@starbeam/runtime": "workspace:^", "@starbeam/service": "workspace:^", "@starbeam/universal": "workspace:^", "@starbeam/vue": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^", + "@starbeam-workspace/vue-testing-utils": "workspace:^", "@testing-library/dom": "^9.2.0", "@testing-library/vue": "^7.0.0", "@vue/test-utils": "^2.4.1", @@ -17,17 +29,5 @@ "devDependencies": { "@starbeam/eslint-plugin": "workspace:^", "vue": "^3.3.4" - }, - "name": "@starbeam-tests/vue", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/vue/vue/tests/tsconfig.json b/packages/vue/vue/tests/tsconfig.json index 5ad91780..90ddad67 100644 --- a/packages/vue/vue/tests/tsconfig.json +++ b/packages/vue/vue/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/x/devtool/.eslintrc.json b/packages/x/devtool/.eslintrc.json index 953bbc38..aff01754 100644 --- a/packages/x/devtool/.eslintrc.json +++ b/packages/x/devtool/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.{tsx,ts}", "src/**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.{tsx,ts}", + "src/**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/x/devtool/index.tsx b/packages/x/devtool/index.tsx index 222c5272..da31848e 100644 --- a/packages/x/devtool/index.tsx +++ b/packages/x/devtool/index.tsx @@ -1,4 +1,3 @@ export * from "./src/log/log.js"; export type { UpdatePane } from "./src/log/pane.js"; export * from "./src/log/tabs.js"; -// export * from "./src/single/single-reactive.js"; diff --git a/packages/x/devtool/package.json b/packages/x/devtool/package.json index 7ac3ba5a..0ec5f808 100644 --- a/packages/x/devtool/package.json +++ b/packages/x/devtool/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/x/devtool/src/log/cell.tsx b/packages/x/devtool/src/log/cell.tsx index da352a01..e13030db 100644 --- a/packages/x/devtool/src/log/cell.tsx +++ b/packages/x/devtool/src/log/cell.tsx @@ -5,13 +5,8 @@ import "preact"; import type { Timestamp } from "@starbeam/tags"; /** @jsxRuntime automatic @jsxImportSource preact */ -// import type { -// CellConsumeOperation, -// CellUpdateOperation, -// } from "@starbeam/debug"; import type { JSX } from "preact"; -// import type { DevtoolsOptions } from "./shared.js"; import { LogLineFor } from "./ui.js"; type FIXME = any; diff --git a/packages/x/devtool/src/log/shared.ts b/packages/x/devtool/src/log/shared.ts deleted file mode 100644 index 4a28c081..00000000 --- a/packages/x/devtool/src/log/shared.ts +++ /dev/null @@ -1,9 +0,0 @@ -// import type { DebugFilter } from "@starbeam/debug"; -// import type { StackFrameDisplayOptions } from "@starbeam/interfaces"; - -// export type DevtoolsLineOptions = StackFrameDisplayOptions; - -// export interface DevtoolsOptions extends DevtoolsLineOptions { -// filter?: DebugFilter; -// internals?: boolean; -// } diff --git a/packages/x/headless-form/.eslintrc.json b/packages/x/headless-form/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/x/headless-form/.eslintrc.json +++ b/packages/x/headless-form/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/x/headless-form/package.json b/packages/x/headless-form/package.json index b186994f..f81a98fa 100644 --- a/packages/x/headless-form/package.json +++ b/packages/x/headless-form/package.json @@ -11,11 +11,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/x/store/.eslintrc.json b/packages/x/store/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/x/store/.eslintrc.json +++ b/packages/x/store/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/x/store/package.json b/packages/x/store/package.json index d40ae5da..00bd0aba 100644 --- a/packages/x/store/package.json +++ b/packages/x/store/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/x/store/tests/.eslintrc.json b/packages/x/store/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/x/store/tests/.eslintrc.json +++ b/packages/x/store/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/x/store/tests/package.json b/packages/x/store/tests/package.json index dc33751c..13f15dd6 100644 --- a/packages/x/store/tests/package.json +++ b/packages/x/store/tests/package.json @@ -1,4 +1,16 @@ { + "private": true, + "name": "@starbeam-tests/x-store", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { "@faker-js/faker": "^8.0.2", "@starbeam/universal": "workspace:^", @@ -7,17 +19,5 @@ }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/x-store", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/x/store/tests/tsconfig.json b/packages/x/store/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/x/store/tests/tsconfig.json +++ b/packages/x/store/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/packages/x/vanilla/.eslintrc.json b/packages/x/vanilla/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/packages/x/vanilla/.eslintrc.json +++ b/packages/x/vanilla/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/packages/x/vanilla/package.json b/packages/x/vanilla/package.json index 9f606a08..8d913115 100644 --- a/packages/x/vanilla/package.json +++ b/packages/x/vanilla/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/packages/x/vanilla/tests/.eslintrc.json b/packages/x/vanilla/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/packages/x/vanilla/tests/.eslintrc.json +++ b/packages/x/vanilla/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/packages/x/vanilla/tests/package.json b/packages/x/vanilla/tests/package.json index 560658c2..f053ea1f 100644 --- a/packages/x/vanilla/tests/package.json +++ b/packages/x/vanilla/tests/package.json @@ -1,4 +1,16 @@ { + "private": true, + "name": "@starbeam-tests/x-vanilla", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, + "scripts": { + "test:lint": "eslint . --max-warnings 0", + "test:types": "tsc -b" + }, "dependencies": { "@starbeam/shared": "workspace:^", "@starbeam/universal": "workspace:^", @@ -6,17 +18,5 @@ }, "devDependencies": { "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-tests/x-vanilla", - "private": true, - "scripts": { - "test:lint": "eslint . --max-warnings 0", - "test:types": "tsc -b" - }, - "starbeam": { - "source": "tsx", - "type": "tests" - }, - "type": "module", - "version": "1.0.0" + } } diff --git a/packages/x/vanilla/tests/tsconfig.json b/packages/x/vanilla/tests/tsconfig.json index d27916c2..51fc86fe 100644 --- a/packages/x/vanilla/tests/tsconfig.json +++ b/packages/x/vanilla/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../../dist/packages", "types": [ "../../../env.d.ts", diff --git a/workspace/@domtree/any/.eslintrc.json b/workspace/@domtree/any/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/@domtree/any/.eslintrc.json +++ b/workspace/@domtree/any/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/@domtree/any/package.json b/workspace/@domtree/any/package.json index dd3b4f30..8981ccc3 100644 --- a/workspace/@domtree/any/package.json +++ b/workspace/@domtree/any/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/@domtree/any/tsconfig.json b/workspace/@domtree/any/tsconfig.json index f8900d97..342c18f6 100644 --- a/workspace/@domtree/any/tsconfig.json +++ b/workspace/@domtree/any/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/workspace/@domtree/browser/.eslintrc.json b/workspace/@domtree/browser/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/@domtree/browser/.eslintrc.json +++ b/workspace/@domtree/browser/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/@domtree/browser/package.json b/workspace/@domtree/browser/package.json index 7f3c9879..c3684240 100644 --- a/workspace/@domtree/browser/package.json +++ b/workspace/@domtree/browser/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/@domtree/browser/tsconfig.json b/workspace/@domtree/browser/tsconfig.json index f8900d97..342c18f6 100644 --- a/workspace/@domtree/browser/tsconfig.json +++ b/workspace/@domtree/browser/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/workspace/@domtree/flavors/.eslintrc.json b/workspace/@domtree/flavors/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/@domtree/flavors/.eslintrc.json +++ b/workspace/@domtree/flavors/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/@domtree/flavors/package.json b/workspace/@domtree/flavors/package.json index d3626b27..e4b49a95 100644 --- a/workspace/@domtree/flavors/package.json +++ b/workspace/@domtree/flavors/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/@domtree/flavors/tsconfig.json b/workspace/@domtree/flavors/tsconfig.json index f8900d97..342c18f6 100644 --- a/workspace/@domtree/flavors/tsconfig.json +++ b/workspace/@domtree/flavors/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/workspace/@domtree/interface/.eslintrc.json b/workspace/@domtree/interface/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/@domtree/interface/.eslintrc.json +++ b/workspace/@domtree/interface/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/@domtree/interface/package.json b/workspace/@domtree/interface/package.json index 73653faf..8b8d57df 100644 --- a/workspace/@domtree/interface/package.json +++ b/workspace/@domtree/interface/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/@domtree/interface/tsconfig.json b/workspace/@domtree/interface/tsconfig.json index f8900d97..342c18f6 100644 --- a/workspace/@domtree/interface/tsconfig.json +++ b/workspace/@domtree/interface/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/workspace/@domtree/minimal/.eslintrc.json b/workspace/@domtree/minimal/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/@domtree/minimal/.eslintrc.json +++ b/workspace/@domtree/minimal/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/@domtree/minimal/package.json b/workspace/@domtree/minimal/package.json index 5f950b4f..2a01d250 100644 --- a/workspace/@domtree/minimal/package.json +++ b/workspace/@domtree/minimal/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/@domtree/minimal/tsconfig.json b/workspace/@domtree/minimal/tsconfig.json index f8900d97..342c18f6 100644 --- a/workspace/@domtree/minimal/tsconfig.json +++ b/workspace/@domtree/minimal/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../../dist/types", + "declarationMap": true, "outDir": "../../../dist/packages", - "composite": true, "types": [ "../../../packages/env.d.ts", "../../../packages/env.d.ts", diff --git a/workspace/build/.eslintrc.json b/workspace/build/.eslintrc.json index 3af7d978..a4168766 100644 --- a/workspace/build/.eslintrc.json +++ b/workspace/build/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/esm"], - "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}"], + "extends": [ + "plugin:@starbeam/esm" + ], + "files": [ + "index.{js,d.ts}", + "src/**/*.{js,d.ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/build/package.json b/workspace/build/package.json index 816d040e..362466a4 100644 --- a/workspace/build/package.json +++ b/workspace/build/package.json @@ -9,13 +9,7 @@ "default": "./index.js" }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } - }, + "exports": "./dist/index.d.ts", "main": "dist/index.cjs", "types": "dist/index.d.ts" }, diff --git a/workspace/build/tsconfig.json b/workspace/build/tsconfig.json index 8262cabd..658b7a8e 100644 --- a/workspace/build/tsconfig.json +++ b/workspace/build/tsconfig.json @@ -1,19 +1,19 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declaration": true, + "allowJs": true, + "allowSyntheticDefaultImports": false, + "checkJs": true, "composite": true, - "target": "ESNext", + "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, + "esModuleInterop": false, "module": "NodeNext", "moduleResolution": "NodeNext", - "declarationDir": "../../dist/types", - "outDir": "../../dist/packages", - "allowJs": true, - "checkJs": true, "noImplicitAny": true, - "allowSyntheticDefaultImports": false, - "esModuleInterop": false, + "outDir": "../../dist/packages", + "target": "ESNext", "types": [ "node", "magic-string", diff --git a/workspace/edit-json/.eslintrc.json b/workspace/edit-json/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/edit-json/.eslintrc.json +++ b/workspace/edit-json/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/edit-json/package.json b/workspace/edit-json/package.json index 4ce4fed8..18fc37af 100644 --- a/workspace/edit-json/package.json +++ b/workspace/edit-json/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/edit-json/tests/.eslintrc.json b/workspace/edit-json/tests/.eslintrc.json index 685eb23c..9b58b6e4 100644 --- a/workspace/edit-json/tests/.eslintrc.json +++ b/workspace/edit-json/tests/.eslintrc.json @@ -1,18 +1,33 @@ { - "ignorePatterns": ["node_modules", "dist", "html", "tests"], + "root": true, + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/loose"], - "files": ["**/*.{tsx,ts}"], + "extends": [ + "plugin:@starbeam/loose" + ], + "files": [ + "**/*.{tsx,ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } - ], - "plugins": ["@starbeam"], - "root": true + ] } diff --git a/workspace/edit-json/tests/package.json b/workspace/edit-json/tests/package.json index e96bc4db..5e49071d 100644 --- a/workspace/edit-json/tests/package.json +++ b/workspace/edit-json/tests/package.json @@ -1,22 +1,22 @@ { - "dependencies": { - "@starbeam-workspace/edit-json": "workspace:^", - "@starbeam/verify": "workspace:^" - }, - "devDependencies": { - "@starbeam-workspace/test-utils": "workspace:^", - "@starbeam/eslint-plugin": "workspace:^" - }, - "name": "@starbeam-workspace-tests/edit-jsonc", "private": true, + "name": "@starbeam-workspace-tests/edit-jsonc", + "version": "1.0.0", + "type": "module", + "starbeam": { + "source": "tsx", + "type": "tests" + }, "scripts": { "test:lint": "eslint . --max-warnings 0", "test:types": "tsc -b" }, - "starbeam": { - "source": "tsx", - "type": "tests" + "dependencies": { + "@starbeam/verify": "workspace:^", + "@starbeam-workspace/edit-json": "workspace:^" }, - "type": "module", - "version": "1.0.0" + "devDependencies": { + "@starbeam/eslint-plugin": "workspace:^", + "@starbeam-workspace/test-utils": "workspace:^" + } } diff --git a/workspace/edit-json/tests/tsconfig.json b/workspace/edit-json/tests/tsconfig.json index cb527a98..a9c31962 100644 --- a/workspace/edit-json/tests/tsconfig.json +++ b/workspace/edit-json/tests/tsconfig.json @@ -1,12 +1,12 @@ { "extends": "../../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "jsxImportSource": "react", - "jsx": "react-jsx", "composite": true, "declaration": true, "declarationDir": "../../../dist/types", "declarationMap": true, + "jsx": "react-jsx", + "jsxImportSource": "react", "outDir": "../../../dist/packages" }, "exclude": ["dist/**/*"] diff --git a/workspace/eslint/.eslintrc.json b/workspace/eslint/.eslintrc.json index 074e100c..fb4580d5 100644 --- a/workspace/eslint/.eslintrc.json +++ b/workspace/eslint/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/commonjs"], - "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}"], + "extends": [ + "plugin:@starbeam/commonjs" + ], + "files": [ + "index.{js,d.ts}", + "src/**/*.{js,d.ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/eslint/package.json b/workspace/eslint/package.json index 48dc5b70..61351f3b 100644 --- a/workspace/eslint/package.json +++ b/workspace/eslint/package.json @@ -8,13 +8,7 @@ "default": "./index.js" }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } - }, + "exports": "./dist/index.d.ts", "main": "dist/index.cjs", "types": "dist/index.d.ts" }, diff --git a/workspace/eslint/src/tight.js b/workspace/eslint/src/tight.js index a9bf7a13..d9db414e 100644 --- a/workspace/eslint/src/tight.js +++ b/workspace/eslint/src/tight.js @@ -1,10 +1,7 @@ // eslint-disable-next-line unused-imports/no-unused-vars const { Linter } = require("eslint"); -exports.extends = [ - "plugin:@typescript-eslint/strict", - "plugin:etc/recommended", -]; +exports.extends = ["plugin:@typescript-eslint/strict"]; /** @type {Linter.RulesRecord} */ const MAGIC_NUMBERS = { diff --git a/workspace/eslint/tsconfig.json b/workspace/eslint/tsconfig.json index 18688a45..d8d29f7e 100644 --- a/workspace/eslint/tsconfig.json +++ b/workspace/eslint/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "target": "ESNext", - "allowJs": true, "allowSyntheticDefaultImports": true, "checkJs": true, @@ -30,15 +28,9 @@ "skipLibCheck": true, "strict": true, + "target": "ESNext", - "types": [ - "../../packages/env.d.ts", - "../../packages/env.d.ts", - "../../packages/env.d.ts", - "../../packages/env.d.ts", - "../../packages/env.d.ts", - "../../packages/env.d.ts" - ], + "types": ["../../packages/env.d.ts"], "useDefineForClassFields": true }, diff --git a/workspace/json/.eslintrc.json b/workspace/json/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/json/.eslintrc.json +++ b/workspace/json/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/json/package.json b/workspace/json/package.json index 11110834..3d2a382a 100644 --- a/workspace/json/package.json +++ b/workspace/json/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/json/tsconfig.json b/workspace/json/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/json/tsconfig.json +++ b/workspace/json/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/misc/.eslintrc.json b/workspace/misc/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/misc/.eslintrc.json +++ b/workspace/misc/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/misc/package.json b/workspace/misc/package.json index fc724a06..a4852486 100644 --- a/workspace/misc/package.json +++ b/workspace/misc/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/misc/tsconfig.json b/workspace/misc/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/misc/tsconfig.json +++ b/workspace/misc/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/package/.eslintrc.json b/workspace/package/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/package/.eslintrc.json +++ b/workspace/package/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/package/package.json b/workspace/package/package.json index c78e2a72..24e20e01 100644 --- a/workspace/package/package.json +++ b/workspace/package/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/package/tsconfig.json b/workspace/package/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/package/tsconfig.json +++ b/workspace/package/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/paths/.eslintrc.json b/workspace/paths/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/paths/.eslintrc.json +++ b/workspace/paths/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/paths/package.json b/workspace/paths/package.json index d82684af..4f2a4f30 100644 --- a/workspace/paths/package.json +++ b/workspace/paths/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/paths/tsconfig.json b/workspace/paths/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/paths/tsconfig.json +++ b/workspace/paths/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/reporter/.eslintrc.json b/workspace/reporter/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/reporter/.eslintrc.json +++ b/workspace/reporter/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/reporter/package.json b/workspace/reporter/package.json index fac41c8e..a85a4fc8 100644 --- a/workspace/reporter/package.json +++ b/workspace/reporter/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/reporter/src/format.ts b/workspace/reporter/src/format.ts index fc1f1152..8ab87ce8 100644 --- a/workspace/reporter/src/format.ts +++ b/workspace/reporter/src/format.ts @@ -140,34 +140,6 @@ export function wrapIndented( const wrapped = wrapLines(string, options); return wrapped.lines.join("\n"); - - // const lines = string.split("\n"); - // const width = terminalWidth(); - - // const formatted = lines.flatMap((line) => { - // if (line.trim() === "") { - // return [line]; - // } - - // // determine the number of spaces at the beginning of the line - // let spaces: number; - - // if (columns) { - // spaces = columns; - // } else { - // const match = matchPattern<[string]>(/^(\s*)/, line); - // const [leading] = match; - - // spaces = leading.length + SPACES_PER_TAB; - // } - - // const wrapped = wrap(line, width - spaces, { trim: false }); - // const [first, ...rest] = wrapped.split("\n"); - - // return [first, ...rest.map((l) => " ".repeat(spaces) + l.trim())]; - // }); - - // return formatted.join("\n"); } type FormatStyle = diff --git a/workspace/reporter/src/logger.ts b/workspace/reporter/src/logger.ts index ef8c09e5..d9592149 100644 --- a/workspace/reporter/src/logger.ts +++ b/workspace/reporter/src/logger.ts @@ -448,23 +448,6 @@ export class States { this.#flushParents(); }, }); - - // this.#current.endWith({ - // nested, - // compact, - // }); - - // } else { - // if (nested.breakBefore) { - // this.#actions.ensureNewline(); - // } - - // this.#actions.wrote( - // this.#current.writeln( - // nested.fragment.stringify(this.#current.loggerState) - // ) - // ); - // } } #flushParents = (): void => { @@ -641,16 +624,6 @@ export class Logger { */ } -function format({ - message, - indents, -}: { - message: string; - indents: number; -}): string { - return wrapIndented(message, { leading: { indents } }); -} - interface WriteResults { wrote: "nothing" | "contents" | "empty"; flush?: boolean; diff --git a/workspace/reporter/tsconfig.json b/workspace/reporter/tsconfig.json index 0bacc745..9084e562 100644 --- a/workspace/reporter/tsconfig.json +++ b/workspace/reporter/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "node", diff --git a/workspace/schemas/.eslintrc.json b/workspace/schemas/.eslintrc.json index c2154e5b..e89de728 100644 --- a/workspace/schemas/.eslintrc.json +++ b/workspace/schemas/.eslintrc.json @@ -1,18 +1,35 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/esm"], - "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}", "bin/**/*.js"], + "extends": [ + "plugin:@starbeam/esm" + ], + "files": [ + "index.{js,d.ts}", + "src/**/*.{js,d.ts}", + "bin/**/*.js" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/schemas/package.json b/workspace/schemas/package.json index 54ce4fb3..0ea1853e 100644 --- a/workspace/schemas/package.json +++ b/workspace/schemas/package.json @@ -9,13 +9,7 @@ "default": "./index.js" }, "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } - }, + "exports": "./dist/index.d.ts", "main": "dist/index.cjs", "types": "dist/index.d.ts" }, diff --git a/workspace/schemas/tsconfig.json b/workspace/schemas/tsconfig.json index e153d969..d3b80ece 100644 --- a/workspace/schemas/tsconfig.json +++ b/workspace/schemas/tsconfig.json @@ -1,20 +1,20 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declaration": true, + "allowJs": true, + "allowSyntheticDefaultImports": false, + "checkJs": true, "composite": true, + "declaration": true, - "target": "ESNext", + "declarationDir": "../../dist/types", + "declarationMap": true, + "esModuleInterop": false, "module": "ESNext", "moduleResolution": "Bundler", - "declarationDir": "../../dist/types", - "outDir": "../../dist/packages", - "allowJs": true, - "checkJs": true, "noImplicitAny": true, - "allowSyntheticDefaultImports": false, - "esModuleInterop": false, + "outDir": "../../dist/packages", + "target": "ESNext", "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/scripts/.eslintrc.json b/workspace/scripts/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/scripts/.eslintrc.json +++ b/workspace/scripts/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/scripts/package.json b/workspace/scripts/package.json index 910d80dc..93d73e65 100644 --- a/workspace/scripts/package.json +++ b/workspace/scripts/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/scripts/src/support/updating/update-file.ts b/workspace/scripts/src/support/updating/update-file.ts index 7271a1ad..da09bf75 100644 --- a/workspace/scripts/src/support/updating/update-file.ts +++ b/workspace/scripts/src/support/updating/update-file.ts @@ -264,6 +264,7 @@ function json({ writeFileSync(path, stringifyJSON(next) + "\n"); workspace.cmd(sh`eslint --fix ${path}`, { cwd: root }); + workspace.cmd(sh`prettier -w ${path}`, { cwd: root }); const file = path.readSync(); diff --git a/workspace/scripts/src/template.ts b/workspace/scripts/src/template.ts index 62dd66cf..f6e1d6e6 100644 --- a/workspace/scripts/src/template.ts +++ b/workspace/scripts/src/template.ts @@ -1,7 +1,6 @@ import { QueryCommand } from "./support/commands/query-command"; import { updateEslintrc } from "./support/template/update-eslint"; import { updatePackageJSON } from "./support/template/update-package-json.js"; -import { updateTests } from "./support/template/update-tests.js"; import { updateTsconfig } from "./support/template/update-tsconfig.js"; import { updateRollup } from "./support/template/updates.js"; import { UpdatePackages } from "./support/updating/update-file.js"; diff --git a/workspace/scripts/tsconfig.json b/workspace/scripts/tsconfig.json index fb24180e..16d5ccd3 100644 --- a/workspace/scripts/tsconfig.json +++ b/workspace/scripts/tsconfig.json @@ -1,13 +1,13 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", - "declaration": true, "composite": true, + "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", "types": ["../../packages/env.d.ts"] }, - "exclude": ["dist/**/*"], - "include": ["**/*", "./src/scripts.json"] + "include": ["**/*", "./src/scripts.json"], + "exclude": ["dist/**/*"] } diff --git a/workspace/shared/.eslintrc.json b/workspace/shared/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/shared/.eslintrc.json +++ b/workspace/shared/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/shared/package.json b/workspace/shared/package.json index e0bab66e..40b57755 100644 --- a/workspace/shared/package.json +++ b/workspace/shared/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/shared/tsconfig.json b/workspace/shared/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/shared/tsconfig.json +++ b/workspace/shared/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/test-utils/.eslintrc.json b/workspace/test-utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/test-utils/.eslintrc.json +++ b/workspace/test-utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/test-utils/package.json b/workspace/test-utils/package.json index 44c6e6ce..08298811 100644 --- a/workspace/test-utils/package.json +++ b/workspace/test-utils/package.json @@ -9,11 +9,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/unstable-release/.eslintrc.json b/workspace/unstable-release/.eslintrc.json index 3af7d978..a4168766 100644 --- a/workspace/unstable-release/.eslintrc.json +++ b/workspace/unstable-release/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/esm"], - "files": ["index.{js,d.ts}", "src/**/*.{js,d.ts}"], + "extends": [ + "plugin:@starbeam/esm" + ], + "files": [ + "index.{js,d.ts}", + "src/**/*.{js,d.ts}" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/unstable-release/package.json b/workspace/unstable-release/package.json index ac278e51..ee244c4f 100644 --- a/workspace/unstable-release/package.json +++ b/workspace/unstable-release/package.json @@ -4,13 +4,7 @@ "version": "0.0.0", "type": "module", "publishConfig": { - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } - }, + "exports": "./dist/index.d.ts", "main": "dist/index.cjs", "types": "dist/index.d.ts" }, diff --git a/workspace/utils/.eslintrc.json b/workspace/utils/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/utils/.eslintrc.json +++ b/workspace/utils/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/utils/package.json b/workspace/utils/package.json index 30995d8a..1eaa9ada 100644 --- a/workspace/utils/package.json +++ b/workspace/utils/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/utils/tsconfig.json b/workspace/utils/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/utils/tsconfig.json +++ b/workspace/utils/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts", diff --git a/workspace/workspace/.eslintrc.json b/workspace/workspace/.eslintrc.json index 52b97b14..66e1250d 100644 --- a/workspace/workspace/.eslintrc.json +++ b/workspace/workspace/.eslintrc.json @@ -1,18 +1,34 @@ { "root": true, - "ignorePatterns": ["node_modules", "dist", "html", "tests"], - "plugins": ["@starbeam"], + "ignorePatterns": [ + "node_modules", + "dist", + "html", + "tests" + ], + "plugins": [ + "@starbeam" + ], "overrides": [ { - "extends": ["plugin:@starbeam/tight"], - "files": ["index.ts", "src/**/*.ts"], + "extends": [ + "plugin:@starbeam/tight" + ], + "files": [ + "index.ts", + "src/**/*.ts" + ], "parserOptions": { "project": "tsconfig.json" } }, { - "extends": ["plugin:@starbeam/json:recommended"], - "files": ["*.json"] + "extends": [ + "plugin:@starbeam/json:recommended" + ], + "files": [ + "*.json" + ] } ] } diff --git a/workspace/workspace/package.json b/workspace/workspace/package.json index 771173d9..ba317c0d 100644 --- a/workspace/workspace/package.json +++ b/workspace/workspace/package.json @@ -10,11 +10,9 @@ }, "publishConfig": { "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.cjs" - } + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.cjs" }, "main": "dist/index.cjs", "types": "dist/index.d.ts" diff --git a/workspace/workspace/src/workspace.ts b/workspace/workspace/src/workspace.ts index 23c9ee04..2f63b1e7 100644 --- a/workspace/workspace/src/workspace.ts +++ b/workspace/workspace/src/workspace.ts @@ -152,8 +152,6 @@ export class Workspace implements IWorkspace { }); } }); - // r.log(Fragment.problem(e.message)); - // r.reportError(e); return; } diff --git a/workspace/workspace/tsconfig.json b/workspace/workspace/tsconfig.json index cddac61d..01645bc6 100644 --- a/workspace/workspace/tsconfig.json +++ b/workspace/workspace/tsconfig.json @@ -1,11 +1,11 @@ { "extends": "../../.config/tsconfig/tsconfig.shared.json", "compilerOptions": { - "declarationMap": true, - "declarationDir": "../../dist/types", + "composite": true, "declaration": true, + "declarationDir": "../../dist/types", + "declarationMap": true, "outDir": "../../dist/packages", - "composite": true, "types": [ "../../packages/env.d.ts", "../../packages/env.d.ts",