Files
cross-env/package.json
T
0112288e01 feat: modernize cross-env with TypeScript, Vitest, and ESM-only build (#261)
NOTE: For the vast majority of users running supported versions of Node.js, this should not require any changes and you can update without issue.

BREAKING CHANGE: This is a major rewrite that changes the module format from CommonJS to ESM-only. The package now requires Node.js >=20 and only exports ESM modules (not relevant in most cases).

BREAKING CHANGE: The package.json exports have been updated to remove CommonJS support. Only ESM imports are now supported.

BREAKING CHANGE: All source files have been converted from JavaScript to TypeScript, requiring TypeScript-aware tooling for development.

- Replace Jest with Vitest for testing
- Convert all source files from .js to .ts with proper TypeScript types
- Use zshy for ESM-only builds (removes CJS support)
- Adopt @epic-web/config for TypeScript, ESLint, and Prettier
- Update to Node.js >=20 requirement
- Remove kcd-scripts dependency
- Add comprehensive e2e tests with GitHub Actions matrix testing
- Update GitHub workflow with caching and cross-platform testing
- Modernize documentation and remove outdated sections
- Update all dependencies to latest versions
- Add proper TypeScript declarations and exports

The tool maintains its original functionality while being completely modernized with the latest tooling and best practices

Co-authored-by: GitHub Action <[email protected]>
2025-07-25 15:19:14 -06:00

90 lines
2.5 KiB
JSON

{
"name": "cross-env",
"version": "0.0.0-semantically-released",
"description": "Run scripts that set and use environment variables across platforms",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"bin": {
"cross-env": "./dist/bin/cross-env.js",
"cross-env-shell": "./dist/bin/cross-env-shell.js"
},
"engines": {
"node": ">=20"
},
"scripts": {
"build": "zshy && npm run clean-cjs",
"clean-cjs": "node other/clean-cjs.js",
"dev": "zshy --watch",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"typecheck": "tsc --noEmit",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"test:e2e": "node e2e/test-cross-env.js && node e2e/test-cross-env-shell.js",
"validate": "npm run build && npm run typecheck && npm run lint && npm run format:check && npm run test:run",
"prepublishOnly": "npm run validate"
},
"files": [
"dist"
],
"keywords": [
"cross-environment",
"environment variable",
"windows",
"cross-platform"
],
"author": "Kent C. Dodds <[email protected]> (https://kentcdodds.com)",
"license": "MIT",
"dependencies": {
"cross-spawn": "^7.0.6"
},
"devDependencies": {
"@epic-web/config": "^1.21.1",
"eslint": "^9.32.0",
"@types/node": "^24.1.0",
"@types/cross-spawn": "^6.0.6",
"prettier": "^3.6.2",
"typescript": "^5.8.3",
"vitest": "^3.2.4",
"@vitest/ui": "^3.2.4",
"@vitest/coverage-v8": "^3.2.4",
"zshy": "^0.2.5"
},
"repository": {
"type": "git",
"url": "https://github.com/kentcdodds/cross-env.git"
},
"bugs": {
"url": "https://github.com/kentcdodds/cross-env/issues"
},
"homepage": "https://github.com/kentcdodds/cross-env#readme",
"zshy": {
"exports": {
".": "./src/index.ts",
"./bin/cross-env": "./src/bin/cross-env.ts",
"./bin/cross-env-shell": "./src/bin/cross-env-shell.ts"
}
},
"prettier": "@epic-web/config/prettier",
"module": "./dist/index.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./bin/cross-env": {
"types": "./dist/bin/cross-env.d.ts",
"import": "./dist/bin/cross-env.js"
},
"./bin/cross-env-shell": {
"types": "./dist/bin/cross-env-shell.d.ts",
"import": "./dist/bin/cross-env-shell.js"
}
}
}