From 15cffee492e0ed8cd699ae8efb8763f9b3367e13 Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Tue, 4 Aug 2026 01:41:55 +0200 Subject: [PATCH 1/4] feat(deps): update dependencies --- cli.js | 19 +++++++++---------- package.json | 6 +++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/cli.js b/cli.js index 97a0dfb..1052243 100755 --- a/cli.js +++ b/cli.js @@ -104,21 +104,21 @@ const fixFlags = /** @satisfies {Record} */ ({ - 'no-include-workspace-root': { + 'include-workspace-root': { type: 'boolean', - 'default': false, + 'default': true, description: 'Excludes the workspace root package', listGroup: 'Workspace options', }, - 'no-parent-workspace': { + 'parent-workspace': { type: 'boolean', - 'default': false, + 'default': true, description: 'Disables detection and use of parent workspace root for module resolution', listGroup: 'Workspace options', }, - 'no-workspaces': { + 'workspaces': { type: 'boolean', - 'default': false, + 'default': true, description: 'Excludes workspace packages', listGroup: 'Workspace options', }, @@ -182,12 +182,15 @@ const { 'engine-ignore': engineIgnore, // deprecated 'engine-no-dev': engineNoDev, // deprecated fix, + 'include-workspace-root': includeWorkspaceRoot, + 'parent-workspace': parentWorkspace, 'peer-check': peerCheck, strict, verbose, 'version-check': versionCheck, workspace, 'workspace-ignore': workspaceIgnore, + workspaces, } = cli.flags; let { @@ -195,10 +198,6 @@ let { 'ignore-dev': ignoreDev, } = cli.flags; -const includeWorkspaceRoot = !cli.flags['no-include-workspace-root']; -const parentWorkspace = !cli.flags['no-parent-workspace']; -const workspaces = !cli.flags['no-workspaces']; - // Handle deprecated flags if (engineIgnore?.length) { ignore = [...ignore || [], ...engineIgnore]; diff --git a/package.json b/package.json index c087757..c64186c 100644 --- a/package.json +++ b/package.json @@ -46,9 +46,9 @@ "typescript": ">=5.9" }, "dependencies": { - "chalk": "^5.6.2", - "installed-check-core": "^8.3.1", - "peowly": "^1.3.3", + "chalk": "^6.0.0", + "installed-check-core": "^9.0.0", + "peowly": "^2.0.1", "pony-cause": "^2.1.10", "resolve-workspace-root": "^2.0.1", "version-guard": "^1.1.3" From 1f7e82e716f2f84d07a2336514bfe803eca4a8ba Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Tue, 4 Aug 2026 01:42:25 +0200 Subject: [PATCH 2/4] chore(deps): update npm-run-all2 to version 9.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c64186c..d506cbe 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "eslint": "^9.39.2", "husky": "^9.1.7", "knip": "^5.83.1", - "npm-run-all2": "^8.0.4", + "npm-run-all2": "^9.0.3", "remark-parse": "^11.0.0", "type-coverage": "^2.30.1", "typescript": "~6.0.3", From a5cbea890a40383f99a99e7f9adf57b62ed56618 Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Tue, 4 Aug 2026 01:43:48 +0200 Subject: [PATCH 3/4] chore(deps): update knip to ^6 --- knip.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/knip.json b/knip.json index 7ddf2d0..733d4f2 100644 --- a/knip.json +++ b/knip.json @@ -1,5 +1,5 @@ { - "$schema": "https://unpkg.com/knip@5/schema.json", + "$schema": "./node_modules/knip/schema-jsonc.json", "ignoreDependencies": [], "ignore": ["examples/**"] } diff --git a/package.json b/package.json index d506cbe..41e36bf 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@voxpelli/tsconfig": "^16.2.1", "eslint": "^9.39.2", "husky": "^9.1.7", - "knip": "^5.83.1", + "knip": "^6.31.0", "npm-run-all2": "^9.0.3", "remark-parse": "^11.0.0", "type-coverage": "^2.30.1", From ea6ee53ad40a161d754d32ade27b7a1d7c4ddce0 Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Tue, 4 Aug 2026 01:46:23 +0200 Subject: [PATCH 4/4] chore(deps): update linting --- cli.js | 4 ++-- examples/basic/package.json | 1 + examples/monorepo/package.json | 1 + .../packages/workspace-a/package.json | 1 + .../packages/workspace-b/package.json | 1 + package.json | 14 ++++++------- test/integration.js | 20 +++++++++---------- test/test-readme.js | 2 +- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/cli.js b/cli.js index 1052243..16fec50 100755 --- a/cli.js +++ b/cli.js @@ -1,11 +1,11 @@ /* eslint-disable no-console, unicorn/no-process-exit */ -import pathModule from 'node:path'; import { createRequire } from 'node:module'; +import pathModule from 'node:path'; import chalk from 'chalk'; +import { installedCheck, ROOT } from 'installed-check-core'; import { formatHelpMessage, peowly } from 'peowly'; import { messageWithCauses, stackWithCauses } from 'pony-cause'; -import { installedCheck, ROOT } from 'installed-check-core'; import resolveWorkspaceRootPkg from 'resolve-workspace-root'; const { resolveWorkspaceRootAsync } = resolveWorkspaceRootPkg; diff --git a/examples/basic/package.json b/examples/basic/package.json index 429aec9..665beff 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -1,4 +1,5 @@ { + "type": "commonjs", "name": "example-basic", "version": "1.0.0", "private": true, diff --git a/examples/monorepo/package.json b/examples/monorepo/package.json index 0802519..9f67936 100644 --- a/examples/monorepo/package.json +++ b/examples/monorepo/package.json @@ -1,4 +1,5 @@ { + "type": "commonjs", "name": "example-monorepo", "version": "1.0.0", "private": true, diff --git a/examples/monorepo/packages/workspace-a/package.json b/examples/monorepo/packages/workspace-a/package.json index 1944b39..5985369 100644 --- a/examples/monorepo/packages/workspace-a/package.json +++ b/examples/monorepo/packages/workspace-a/package.json @@ -1,4 +1,5 @@ { + "type": "commonjs", "name": "workspace-a", "version": "1.0.0", "private": true, diff --git a/examples/monorepo/packages/workspace-b/package.json b/examples/monorepo/packages/workspace-b/package.json index 3d6c728..899f896 100644 --- a/examples/monorepo/packages/workspace-b/package.json +++ b/examples/monorepo/packages/workspace-b/package.json @@ -1,4 +1,5 @@ { + "type": "commonjs", "name": "workspace-b", "version": "1.0.0", "private": true, diff --git a/package.json b/package.json index 41e36bf..17a9f86 100644 --- a/package.json +++ b/package.json @@ -16,17 +16,17 @@ "cli.js" ], "scripts": { - "check:lint": "eslint", + "check": "run-p check:*", "check:installed-check": "node cli-wrapper.cjs", "check:knip": "knip", + "check:lint": "eslint", "check:tsc": "tsc", "check:type-coverage": "type-coverage --detail --strict --at-least 95", - "check": "run-p check:*", "prepare": "husky", - "test:integration": "node --test test/integration.js", + "test": "run-s check test:examples:install test:integration", "test:examples:install": "cd examples/basic && npm install && cd ../monorepo && npm install && cd ../..", - "test-ci": "run-s test:examples:install test:integration check:installed-check", - "test": "run-s check test:examples:install test:integration" + "test:integration": "node --test test/integration.js", + "test-ci": "run-s test:examples:install test:integration check:installed-check" }, "keywords": [ "cli", @@ -55,9 +55,9 @@ }, "devDependencies": { "@types/node": "^22.20.1", - "@voxpelli/eslint-config": "^23.0.0", + "@voxpelli/eslint-config": "^25.1.0", "@voxpelli/tsconfig": "^16.2.1", - "eslint": "^9.39.2", + "eslint": "^9.39.5", "husky": "^9.1.7", "knip": "^6.31.0", "npm-run-all2": "^9.0.3", diff --git a/test/integration.js b/test/integration.js index dd086e9..2b77425 100644 --- a/test/integration.js +++ b/test/integration.js @@ -5,16 +5,14 @@ */ import assert from 'node:assert/strict'; +import path from 'node:path'; import { describe, it } from 'node:test'; -import { fileURLToPath } from 'node:url'; -// eslint-disable-next-line unicorn/import-style -import { dirname, join } from 'node:path'; -import { extractExpectedOutput, normalizeOutput } from './test-readme.js'; + import { run } from './helpers.js'; +import { extractExpectedOutput, normalizeOutput } from './test-readme.js'; -const __dirname = dirname(fileURLToPath(import.meta.url)); -const rootDir = join(__dirname, '..'); -const cliPath = join(rootDir, 'cli-wrapper.cjs'); +const rootDir = path.join(import.meta.dirname, '..'); +const cliPath = path.join(rootDir, 'cli-wrapper.cjs'); /** * Asserts that a CLI flag is recognised (not rejected as "Unknown option"). @@ -31,7 +29,7 @@ async function assertFlagRecognised (flag) { describe('Basic Example', () => { it('output matches README expected output', async () => { - const expectedOutput = await extractExpectedOutput(join(rootDir, 'examples/basic/README.md')); + const expectedOutput = await extractExpectedOutput(path.join(rootDir, 'examples/basic/README.md')); assert.ok(expectedOutput !== undefined, 'Could not extract expected output from README'); const result = await run(`node "${cliPath}" examples/basic`, rootDir); @@ -47,7 +45,7 @@ describe('Basic Example', () => { describe('Monorepo Example', () => { it('workspace-a output matches README expected output', async () => { - const expectedOutput = await extractExpectedOutput(join(rootDir, 'examples/monorepo/packages/workspace-a/README.md')); + const expectedOutput = await extractExpectedOutput(path.join(rootDir, 'examples/monorepo/packages/workspace-a/README.md')); // If there's no expected output in README, it means the example should pass cleanly if (expectedOutput === undefined) { @@ -72,7 +70,7 @@ describe('Monorepo Example', () => { it('debug output shows parent workspace detection', async () => { const expectedDebug = await extractExpectedOutput( - join(rootDir, 'examples/monorepo/packages/workspace-a/README.md'), + path.join(rootDir, 'examples/monorepo/packages/workspace-a/README.md'), 'DEBUG OUTPUT' ); assert.ok(expectedDebug !== undefined, 'Could not extract expected debug output from README'); @@ -116,7 +114,7 @@ describe('Monorepo Example', () => { it('running from monorepo root matches README expected output', async () => { const expectedOutput = await extractExpectedOutput( - join(rootDir, 'examples/monorepo/README.md'), + path.join(rootDir, 'examples/monorepo/README.md'), 'EXPECTED OUTPUT' ); assert.ok(expectedOutput !== undefined, 'Could not extract expected root output from README'); diff --git a/test/test-readme.js b/test/test-readme.js index 16f30ab..4145482 100644 --- a/test/test-readme.js +++ b/test/test-readme.js @@ -1,6 +1,6 @@ import { readFile } from 'node:fs/promises'; -import { unified } from 'unified'; import remarkParse from 'remark-parse'; +import { unified } from 'unified'; import { visit } from 'unist-util-visit'; import { stripAnsi } from './helpers.js';