Skip to content

Commit

Permalink
chore(deps): remove use of cross-env
Browse files Browse the repository at this point in the history
Node 20+ support direct `--import` flags, removing the need for the funky and ugly looking `cross-env` imports on yarn scripts
  • Loading branch information
dtfiedler committed Jan 14, 2025
1 parent 9ffdee0 commit 2f03ec3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"@typescript-eslint/parser": "^5.26.0",
"c8": "^8.0.1",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-header": "^3.1.1",
Expand All @@ -102,15 +101,15 @@
"build": "yarn clean && npx tsc --project ./tsconfig.prod.json && yarn copy-files",
"copy-files": "copyfiles -u 1 src/**/*.graphql src/**/*.sql dist",
"clean": "npx rimraf [ .nyc_output coverage dist ]",
"start": "cross-env NODE_OPTIONS=\"--import=./register.js\" node --env-file=.env src/app.ts",
"start": "node --import ./register.js --env-file=.env src/app.ts",
"start:prod": "yarn build && node dist/app.js",
"watch": "nodemon",
"db:migrate": "cross-env NODE_OPTIONS=\"--import=./register.js\" node src/migrate.ts",
"db:migrate": "node --import ./register.js src/migrate.ts",
"db:dump-test-schemas": "./test/dump-test-schemas",
"test": "cross-env NODE_OPTIONS=\"--import=./register.js \" node --test --test-concurrency 1 src/**/*.test.ts",
"test:ci": "cross-env NODE_OPTIONS=\"--import=./register.js\" npx c8 -r lcov node --test --test-concurrency 1 --test-reporter=spec --test-reporter-destination=stdout src/**/*.test.ts",
"test:coverage": "cross-env NODE_OPTIONS=\"--import=./register.js\" npx c8 -r text -r html node --test --test-concurrency 1 src/**/*.test.ts",
"test:e2e": "cross-env NODE_OPTIONS=\"--import=./register.js\" node --test --test-concurrency 1 --test-reporter=spec --test-reporter-destination=stdout test/**/*.test.ts",
"test": "node --import ./register.js --test --test-concurrency 1 src/**/*.test.ts",
"test:ci": "npx c8 -r lcov node --import ./register.js --test --test-concurrency 1 --test-reporter=spec --test-reporter-destination=stdout src/**/*.test.ts",
"test:coverage": "npx c8 -r text -r html node --import ./register.js --test --test-concurrency 1 src/**/*.test.ts",
"test:e2e": "node --test --test-concurrency 1 --test-reporter=spec --test-reporter-destination=stdout test/**/*.test.ts",
"lint:check": "eslint src test",
"lint:fix": "eslint --fix src test"
}
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4067,21 +4067,14 @@ create-require@^1.1.0:
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==

cross-env@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"

cross-fetch@^3.1.5:
version "3.1.8"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
dependencies:
node-fetch "^2.6.12"

cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down

0 comments on commit 2f03ec3

Please sign in to comment.