Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Lint Files
run: npm run lint

- name: Lint Files, Dependencies, & Exports
run: npm run lint:unused

- name: Check Formatting
run: npm run fmt:check

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Publish to JSR
run: |
if [ -f "jsr.json" ]; then
npx jsr publish
npx -y jsr publish
else
echo "No jsr.json file found, skipping JSR publish."
fi
Expand Down
37 changes: 37 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignore": ["templates/**/*"],
"workspaces": {
".": { "entry": ["scripts/*.js", "tools/*.js", ".github/workflows/*.yml"] },
"packages/compat": {
"ignoreDependencies": ["eslint"],
"entry": ["tests/**/*.{cts,js,ts}"],
"project": ["src/**/*.{cts,js,ts}", "tests/*.{cts,js,ts}"]
},
"packages/config-array": {
"entry": ["tests/**/*.{cts,js,ts}", "rollup.std__path-config.js"],
"project": ["src/**/*.{cts,js,ts}", "tests/**/*.{cts,js,ts}"]
},
"packages/config-helpers": {
"entry": ["tests/**/*.{cts,js,ts}"],
"project": ["src/**/*.{cts,js,ts}", "tests/**/*.{cts,js,ts}"]
},
"packages/core": { "project": ["src/**/*.{cts,js,ts}"] },
"packages/mcp": {
"entry": ["tests/**/*.{cts,js,ts}"],
"project": ["src/**/*.{cts,js,ts}", "tests/**/*.{cts,js,ts}"]
},
"packages/migrate-config": {
"entry": ["src/migrate-config.js", "tests/**/*.{cts,js,ts}"],
"project": ["src/**/*.{cts,js,ts}", "tests/*.{cts,js,ts}"]
},
"packages/object-schema": {
"entry": ["tests/**/*.{cts,js,ts}", "src/types.ts"],
"project": ["src/**/*.{cts,js,ts}", "tests/**/*.{cts,js,ts}"]
},
"packages/plugin-kit": {
"entry": ["tests/**/*.{cts,js,ts}"],
"project": ["src/**/*.{cts,js,ts}", "tests/**/*.{cts,js,ts}"]
}
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"prepare": "npm run build",
"lint": "eslint",
"lint:fix": "eslint --fix",
"lint:unused": "knip",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"test:jsr": "npm run test:jsr --workspaces --if-present",
Expand All @@ -34,9 +35,11 @@
"devDependencies": {
"@eslint/config-helpers": "file:packages/config-helpers",
"@types/mocha": "^10.0.7",
"@types/node": "^24.9.1",
"c8": "^10.1.3",
"eslint": "^9.35.0",
"eslint-config-eslint": "^13.0.0",
"knip": "^5.62.0",
"lint-staged": "^15.2.0",
"mocha": "^11.5.0",
"prettier": "^3.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
"build": "rollup -c && tsc -p tsconfig.esm.json && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test": "mocha \"tests/**/*.test.js\"",
"test:coverage": "c8 npm test"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha", "node"]
}
}
2 changes: 1 addition & 1 deletion packages/config-array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"pretest": "npm run build",
"test": "mocha \"tests/**/*.test.js\"",
"test:coverage": "c8 npm test",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion packages/config-array/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha"]
}
}
3 changes: 1 addition & 2 deletions packages/config-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
"test": "mocha \"tests/**/*.test.js\"",
"test:coverage": "c8 npm test",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:pnpm": "cd tests/pnpm && pnpm install && pnpm exec tsc",
"test:types": "tsc -p tests/types/tsconfig.json"
},
Expand All @@ -51,7 +51,6 @@
"@eslint/core": "^0.16.0"
},
"devDependencies": {
"eslint": "^9.27.0",
"rollup-plugin-copy": "^3.5.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"build:cts": "node -e \"fs.cpSync('dist/esm/types.d.ts', 'dist/cjs/types.d.cts')\"",
"build": "tsc && npm run build:cts",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/migrate-config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/migrate-config-cli.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha"]
}
}
2 changes: 1 addition & 1 deletion packages/object-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
"test": "mocha \"tests/**/*.test.js\"",
"test:coverage": "c8 npm test",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/object-schema/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm"
"outDir": "dist/esm",
"types": ["mocha"]
}
}
2 changes: 1 addition & 1 deletion packages/plugin-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"pretest": "npm run build",
"test": "mocha \"tests/**/*.test.js\"",
"test:coverage": "c8 npm test",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-kit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"files": ["src/index.js"],
"compilerOptions": {
"outDir": "dist/esm",
"strict": true
"strict": true,
"types": ["mocha"]
}
}
2 changes: 1 addition & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function publishPackagesToJsr(packageDirs) {

console.log(`Publishing ${packageDir}...`);
try {
exec(`npx jsr publish`, {
exec(`npx -y jsr publish`, {
stdio: "inherit",
env: process.env,
cwd: packageDir,
Expand Down
2 changes: 1 addition & 1 deletion templates/package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
"test": "mocha \"tests/**/*.test.js\"",
"test:coverage": "c8 npm test",
"test:jsr": "npx jsr@latest publish --dry-run",
"test:jsr": "npx -y jsr@latest publish --dry-run",
"test:types": "tsc -p tests/types/tsconfig.json"
},
"repository": {
Expand Down