Skip to content

Commit

Permalink
Don't build @glimmer/debug, as no package should be using it during p…
Browse files Browse the repository at this point in the history
…ublish-time (#1625)

* Don't build @glimmer/debug, as no package should be using it during publish-time

* Fix lints

* Fix types

* Fix lints

* Re-add @glimmer/debug, but as a devDep

* Remove publint from @glimmer/debug

* Rename lintfix to lint:fix

* test:types
  • Loading branch information
NullVoxPopuli authored Oct 2, 2024
1 parent f1108ef commit 48435a3
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 28 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
'import/parsers': {
'@typescript-eslint/parser': ['.js', '.cjs', '.mjs', '.mts', '.ts', '.d.ts'],
},
'import/core-modules': ['@glimmer/debug'],
'import/resolver': {
typescript: {},
},
Expand Down
4 changes: 3 additions & 1 deletion bin/run-types-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import { fileURLToPath } from 'url';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const root = resolve(__dirname, '..');

const PACKAGES_WITH_NO_PUBLISHED_TYPES = new Set(['@glimmer/vm-babel-plugins', '@glimmer/debug']);

async function main() {
const packages = getPackages().filter((pkg) => pkg.name !== '@glimmer/vm-babel-plugins');
const packages = getPackages().filter((pkg) => !PACKAGES_WITH_NO_PUBLISHED_TYPES.has(pkg.name));

/**
* Runs a smoke test of the generated type definitions by importing every module
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"link:all": "esyes ./bin/link-all.mts",
"lint": "npm-run-all lint:*",
"lint:files": "turbo lint",
"lint:fix": "pnpm turbo test:lint -- --fix && prettier -w .",
"lint:format": "prettier -c .",
"lint:types": "tsc -b",
"lintfix": "pnpm turbo test:lint -- --fix && prettier -w .",
"start": "vite",
"test": "node bin/run-tests.mjs",
"test:babel-plugins": "yarn workspace @glimmer/vm-babel-plugins test",
Expand Down
2 changes: 0 additions & 2 deletions packages/@glimmer/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"dist"
],
"scripts": {
"build": "rollup -c rollup.config.mjs",
"test:lint": "eslint .",
"test:publint": "publint",
"test:types": "tsc --noEmit -p ../tsconfig.json"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@glimmer/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"test:types": "tsc --noEmit -p ../tsconfig.json"
},
"dependencies": {
"@glimmer/debug": "workspace:*",
"@glimmer/destroyable": "workspace:*",
"@glimmer/env": "0.1.7",
"@glimmer/global-context": "workspace:*",
Expand All @@ -45,6 +44,7 @@
},
"devDependencies": {
"@glimmer-workspace/build-support": "workspace:*",
"@glimmer/debug": "workspace:*",
"@glimmer/local-debug-flags": "workspace:*",
"eslint": "^8.52.0",
"publint": "^0.2.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/@glimmer/opcode-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"test:types": "tsc --noEmit -p ../tsconfig.json"
},
"dependencies": {
"@glimmer/debug": "workspace:*",
"@glimmer/encoder": "workspace:*",
"@glimmer/env": "0.1.7",
"@glimmer/global-context": "workspace:*",
Expand All @@ -46,6 +45,7 @@
},
"devDependencies": {
"@glimmer-workspace/build-support": "workspace:*",
"@glimmer/debug": "workspace:*",
"@glimmer/local-debug-flags": "workspace:*",
"eslint": "^8.52.0",
"publint": "^0.2.5",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/syntax/test/plugin-node-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ test('deprecated program visitor', (assert) => {
return {
name: 'plugin',
visitor: {
// eslint-disable-next-line deprecation/deprecation
Program(node: AST.Program) {
assert.step(node.type);
},
Expand Down
45 changes: 23 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48435a3

Please sign in to comment.