Skip to content

Commit

Permalink
Pin chalk to a cjs compatible version (#766)
Browse files Browse the repository at this point in the history
Latest `chalk` is an ESM module and cannot be loaded from the CommonJS
script for `npm-check` and `npm-check-pre-push`. When `node_modules` are
out of date, we get a confusing error message rather than the correct
message. Pin the version in order to avoid this

[Related
thread](https://stackoverflow.com/questions/70309135/chalk-error-err-require-esm-require-of-es-module)

Also pins some snapshots to fix [release
tests](https://github.com/trunk-io/plugins/actions/runs/8935972428).
  • Loading branch information
TylerJang27 committed May 3, 2024
1 parent 6ec7bf3 commit 25f346b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actions/npm-check-pre-push/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"chalk": "^5.0.0",
"chalk": "4.1.2",
"npm-check": "^6.0.1"
}
}
1 change: 1 addition & 0 deletions actions/npm-check/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"dependencies": {
"chalk": "4.1.2",
"npm-check": "^6.0.1"
}
}
1 change: 1 addition & 0 deletions linters/flake8/test_data/flake8_v4.0.1_basic.check.shot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter flake8 test basic 1`] = `
{
Expand Down
1 change: 1 addition & 0 deletions linters/mypy/test_data/mypy_v0.931_CUSTOM.check.shot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter mypy test CUSTOM 1`] = `
{
Expand Down
1 change: 1 addition & 0 deletions linters/mypy/test_data/mypy_v0.990_CUSTOM.check.shot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter mypy test CUSTOM 1`] = `
{
Expand Down
1 change: 1 addition & 0 deletions linters/mypy/test_data/mypy_v1.10.0_CUSTOM.check.shot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter mypy test CUSTOM 1`] = `
{
Expand Down
1 change: 1 addition & 0 deletions linters/mypy/test_data/mypy_v1.6.0_CUSTOM.check.shot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter mypy test CUSTOM 1`] = `
{
Expand Down
1 change: 1 addition & 0 deletions linters/mypy/test_data/mypy_v1.7.0_CUSTOM.check.shot
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// trunk-upgrade-validation:RELEASE

exports[`Testing linter mypy test CUSTOM 1`] = `
{
Expand Down

0 comments on commit 25f346b

Please sign in to comment.