Skip to content

Commit

Permalink
[patch] update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
electrovir committed Jul 18, 2024
1 parent 939d44f commit b3c0871
Show file tree
Hide file tree
Showing 7 changed files with 2,444 additions and 1,349 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Spellcheck code with cspell. By default this spellchecks every file in the entir

## test

Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.js.
Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.cjs.

This command is meant to run Node.js tests. For running web-based testing, see the test-web command.

Expand Down
3,741 changes: 2,418 additions & 1,323 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "virmator",
"version": "12.0.2",
"version": "12.0.3",
"description": "Handle common package configs, commands, and dependencies.",
"keywords": [
"automation",
Expand Down Expand Up @@ -43,58 +43,58 @@
"test:types": "tsc --noEmit"
},
"dependencies": {
"@augment-vir/common": "^29.1.2",
"@augment-vir/node-js": "^29.1.2",
"@augment-vir/common": "^29.3.0",
"@augment-vir/node-js": "^29.3.0",
"ansi-colors": "^4.1.3",
"concurrently": "^8.2.2",
"fs-extra": "^11.2.0",
"glob": "^8.1.0",
"glob-promise": "^6.0.7",
"mono-vir": "^1.0.1",
"semver": "^7.6.2",
"semver": "^7.6.3",
"simple-git": "^3.25.0",
"type-fest": "^4.20.1"
"type-fest": "^4.22.1"
},
"devDependencies": {
"@electrovir/nyc": "15.1.0-fix0",
"@electrovir/nyc": "17.0.0",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@open-wc/testing": "^4.0.0",
"@types/chai": "^4.3.16",
"@types/fs-extra": "^11.0.4",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.7",
"@types/node": "^20.14.8",
"@types/node": "^20.14.11",
"@types/semver": "^7.5.8",
"@web/dev-server-esbuild": "^1.0.2",
"@web/test-runner": "^0.18.2",
"@web/test-runner-commands": "^0.9.0",
"@web/test-runner-playwright": "^0.11.0",
"@web/test-runner-visual-regression": "^0.9.0",
"chai": "^4.3.10",
"cspell": "^8.9.1",
"dependency-cruiser": "^16.3.3",
"cspell": "^8.11.0",
"dependency-cruiser": "^16.3.7",
"element-vir": "^22.2.2",
"esbuild": "^0.21.5",
"esbuild": "^0.23.0",
"istanbul-smart-text-reporter": "^1.1.4",
"markdown-code-example-inserter": "^1.0.0",
"mocha": "^10.4.0",
"mocha": "^10.6.0",
"mocha-spec-reporter-with-file-names": "^0.0.3",
"npm-check-updates": "~16.12.3",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"prettier-plugin-interpolated-html-tags": "^1.0.5",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-multiline-arrays": "^3.0.6",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-packagejson": "^2.5.0",
"prettier-plugin-organize-imports": "^4.0.0",
"prettier-plugin-packagejson": "^2.5.1",
"prettier-plugin-sort-json": "^4.0.0",
"prettier-plugin-toml": "^2.0.1",
"test-as-package": "^1.0.0",
"test-established-expectations": "^1.0.0",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typedoc": "^0.26.0",
"typescript": "^5.5.2",
"virmator": "./",
"typedoc": "^0.26.4",
"typescript": "^5.5.3",
"virmator": "^12.0.2",
"vite": "^4.5.0",
"vite-tsconfig-paths": "^4.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/api/run-command/check-npm-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function cleanDepVersion(input: string | undefined): string | undefined {
return '*';
}

return input ? semver.clean(input) ?? semver.minVersion(input)?.raw ?? undefined : undefined;
return input ? (semver.clean(input) ?? semver.minVersion(input)?.raw ?? undefined) : undefined;
}

async function getVersionsToUpgradeTo({
Expand Down
4 changes: 2 additions & 2 deletions src/commands/test.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const testCommandDefinition = defineCommand(
sections: [
{
title: '',
content: `Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.js.`,
content: `Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.cjs.`,
},
{
title: '',
Expand Down Expand Up @@ -84,7 +84,7 @@ export const testCommandDefinition = defineCommand(
? [
await getNpmBinPath({
repoDir: inputs.repoDir,
command: 'electrovir-nyc',
command: 'vir-nyc',
packageDirPath: inputs.packageDir,
}),
// force colors in nyc
Expand Down
10 changes: 5 additions & 5 deletions test-files/test-expectations.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"exitCode": 1,
"key": "circular-deps-fail",
"stderr": "deps failed.",
"stdout": "Installing esbuild... Installing npm-check-updates... Installing dependency-cruiser... running deps... Successfully copied dep-cruiser.config.ts Successfully copied ncu.config.ts node_modules/.bin/depcruise --config ./test-files/deps/circular/configs/generated-config-dep-cruiser.config.cjs src error no-circular: src/one.ts → src/two.ts → src/one.ts 1 dependency violations (1 errors, 0 warnings). 2 modules, 2 dependencies cruised."
"stdout": "Installing esbuild... Installing npm-check-updates... Installing dependency-cruiser... running deps... Successfully copied dep-cruiser.config.ts Successfully copied ncu.config.ts node_modules/.bin/depcruise --config ./test-files/deps/circular/configs/generated-config-dep-cruiser.config.cjs src error no-circular: src/one.ts → src/two.ts → src/one.ts x 1 dependency violations (1 errors, 0 warnings). 2 modules, 2 dependencies cruised."
},
"multi-sub-command-fail": {
"dir": "deps/valid",
Expand All @@ -49,14 +49,14 @@
"exitCode": 1,
"key": "npn-npm-dep-fail",
"stderr": "deps failed.",
"stdout": "Installing esbuild... Installing npm-check-updates... Installing dependency-cruiser... running deps... Successfully copied dep-cruiser.config.ts Successfully copied ncu.config.ts node_modules/.bin/depcruise --config ./test-files/deps/non-npm-dep/configs/generated-config-dep-cruiser.config.cjs src error no-non-package-json: src/index.ts → ../../../node_modules/@augment-vir/common/dist/cjs/index.js 1 dependency violations (1 errors, 0 warnings). 2 modules, 1 dependencies cruised."
"stdout": "Installing esbuild... Installing npm-check-updates... Installing dependency-cruiser... running deps... Successfully copied dep-cruiser.config.ts Successfully copied ncu.config.ts node_modules/.bin/depcruise --config ./test-files/deps/non-npm-dep/configs/generated-config-dep-cruiser.config.cjs src error no-non-package-json: src/index.ts → ../../../node_modules/@augment-vir/common/dist/cjs/index.js x 1 dependency violations (1 errors, 0 warnings). 2 modules, 1 dependencies cruised."
},
"orphan-fail": {
"dir": "deps/orphan",
"exitCode": 1,
"key": "orphan-fail",
"stderr": "deps failed.",
"stdout": "Installing esbuild... Installing npm-check-updates... Installing dependency-cruiser... running deps... Successfully copied dep-cruiser.config.ts Successfully copied ncu.config.ts node_modules/.bin/depcruise --config ./test-files/deps/orphan/configs/generated-config-dep-cruiser.config.cjs src error no-orphans: src/one.ts 1 dependency violations (1 errors, 0 warnings). 2 modules, 0 dependencies cruised."
"stdout": "Installing esbuild... Installing npm-check-updates... Installing dependency-cruiser... running deps... Successfully copied dep-cruiser.config.ts Successfully copied ncu.config.ts node_modules/.bin/depcruise --config ./test-files/deps/orphan/configs/generated-config-dep-cruiser.config.cjs src error no-orphans: src/one.ts x 1 dependency violations (1 errors, 0 warnings). 2 modules, 0 dependencies cruised."
},
"upgrades-deps": {
"dir": "deps/not-up-to-date",
Expand Down Expand Up @@ -241,7 +241,7 @@
"exitCode": 1,
"key": "all-tests",
"stderr": "test failed.",
"stdout": "Installing @electrovir/nyc... Installing @istanbuljs/nyc-config-typescript... Installing @types/chai... Installing @types/mocha... Installing chai... Installing istanbul-smart-text-reporter... Installing mocha-spec-reporter-with-file-names... Installing mocha... Installing ts-node... running test... Successfully copied mocha.config.cjs Successfully copied nyc.config.js node_modules/.bin/electrovir-nyc --colors --nycrc-path 'configs/nyc.config.js' ./test-files/test/multi-test-repo/node_modules/.bin/mocha --colors --config 'configs/mocha.config.cjs' --parallel=false --sort src/invalid.test.ts invalid.test.ts 1) should have a failing test src/valid.test.ts valid.test.ts ✔ should have passing test 1 passing 1 failing 1) invalid.test.ts (src/invalid.test.ts) should have a failing test: AssertionError: expected false to be true + expected - actual -false +true"
"stdout": "Installing @electrovir/nyc... Installing @istanbuljs/nyc-config-typescript... Installing @types/chai... Installing @types/mocha... Installing chai... Installing istanbul-smart-text-reporter... Installing mocha-spec-reporter-with-file-names... Installing mocha... Installing ts-node... running test... Successfully copied mocha.config.cjs Successfully copied nyc.config.js node_modules/.bin/vir-nyc --colors --nycrc-path 'configs/nyc.config.js' ./test-files/test/multi-test-repo/node_modules/.bin/mocha --colors --config 'configs/mocha.config.cjs' --parallel=false --sort src/invalid.test.ts invalid.test.ts 1) should have a failing test src/valid.test.ts valid.test.ts ✔ should have passing test 1 passing 1 failing 1) invalid.test.ts (src/invalid.test.ts) should have a failing test: AssertionError: expected false to be true + expected - actual -false +true"
},
"failing-tests": {
"dir": "test/invalid-test-repo",
Expand All @@ -255,7 +255,7 @@
"exitCode": 1,
"key": "incomplete-coverage",
"stderr": "Test coverage requirement of 100% not met. test failed.",
"stdout": "Installing @electrovir/nyc... Installing @istanbuljs/nyc-config-typescript... Installing @types/chai... Installing @types/mocha... Installing chai... Installing istanbul-smart-text-reporter... Installing mocha-spec-reporter-with-file-names... Installing mocha... Installing ts-node... running test... Successfully copied mocha.config.cjs Successfully copied nyc.config.js node_modules/.bin/electrovir-nyc --colors --nycrc-path 'configs/nyc.config.js' ./test-files/test/valid-test-repo/node_modules/.bin/mocha --colors --config 'configs/mocha.config.cjs' --parallel=false --sort src/valid.test.ts valid.test.ts ✔ should have a valid test 1 passingAll files | 0 | 100 | 0 | 0 | uncovered.ts | 0 | 100 | 0 | 0 | 2 --------------|---------|----------|---------|---------|-------------------"
"stdout": "Installing @electrovir/nyc... Installing @istanbuljs/nyc-config-typescript... Installing @types/chai... Installing @types/mocha... Installing chai... Installing istanbul-smart-text-reporter... Installing mocha-spec-reporter-with-file-names... Installing mocha... Installing ts-node... running test... Successfully copied mocha.config.cjs Successfully copied nyc.config.js node_modules/.bin/vir-nyc --colors --nycrc-path 'configs/nyc.config.js' ./test-files/test/valid-test-repo/node_modules/.bin/mocha --colors --config 'configs/mocha.config.cjs' --parallel=false --sort src/valid.test.ts valid.test.ts ✔ should have a valid test 1 passingAll files | 0 | 100 | 0 | 0 | uncovered.ts | 0 | 100 | 0 | 0 | 2 --------------|---------|----------|---------|---------|-------------------"
},
"passing-tests": {
"dir": "test/valid-test-repo",
Expand Down

0 comments on commit b3c0871

Please sign in to comment.