From ebdefbd790b9136fa3894a1dc1f9ca1f1cb776a6 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Wed, 11 Feb 2026 12:24:29 +0800 Subject: [PATCH 1/2] fix: Remove unused requires --- cmds/core/emacs.js | 3 --- cmds/core/init.js | 4 ---- 2 files changed, 7 deletions(-) diff --git a/cmds/core/emacs.js b/cmds/core/emacs.js index 08f8957e..4581d0b9 100644 --- a/cmds/core/emacs.js +++ b/cmds/core/emacs.js @@ -17,9 +17,6 @@ "use strict"; -const os = require('os'); -const fs = require('fs'); -const path = require('path'); const child_process = require("child_process"); exports.command = ['emacs [args..]']; diff --git a/cmds/core/init.js b/cmds/core/init.js index 1be3fc27..9045c58a 100644 --- a/cmds/core/init.js +++ b/cmds/core/init.js @@ -17,10 +17,6 @@ "use strict"; -const path = require('path'); -const fs = require('fs'); -const readline = require('readline'); - exports.command = ['init [files..]']; exports.desc = 'Initialize project to use Eask'; exports.builder = yargs => yargs From acd8f57f52458d07fc0b0e979fbcde54792c171c Mon Sep 17 00:00:00 2001 From: JenChieh Date: Wed, 11 Feb 2026 12:27:37 +0800 Subject: [PATCH 2/2] fix: Use cross-env --- package-lock.json | 32 +++++++++++++++++++++++++++++--- package.json | 5 +++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2db23e6f..dae49a65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ }, "devDependencies": { "@yao-pkg/pkg": "^6.0.0", + "cross-env": "^10.1.0", "jest": "^29.7.0", "semver-compare": "^1.0.0" } @@ -558,6 +559,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@epic-web/invariant": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", + "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", + "dev": true, + "license": "MIT" + }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -1887,6 +1895,24 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/cross-env": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz", + "integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@epic-web/invariant": "^1.0.0", + "cross-spawn": "^7.0.6" + }, + "bin": { + "cross-env": "dist/bin/cross-env.js", + "cross-env-shell": "dist/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -4356,9 +4382,9 @@ } }, "node_modules/tar": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.6.tgz", - "integrity": "sha512-xqUeu2JAIJpXyvskvU3uvQW8PAmHrtXp2KDuMJwQqW8Sqq0CaZBAQ+dKS3RBXVhU4wC5NjAdKrmh84241gO9cA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz", + "integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { diff --git a/package.json b/package.json index 9c82e43a..2fa402b2 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "A set of command-line tools to build Emacs packages", "main": "eask", "scripts": { - "test-unsafe": "env ALLOW_UNSAFE=1 jest", - "test-debug": "env DEBUG=1 jest", + "test-unsafe": "cross-env ALLOW_UNSAFE=1 jest", + "test-debug": "cross-env DEBUG=1 jest", "test": "jest", "test-reset": "rm -rf ./test/jest/.eask ./test/jest/*/.eask; git restore ./test/jest/*/", "pkg-all": "pkg package.json", @@ -37,6 +37,7 @@ }, "devDependencies": { "@yao-pkg/pkg": "^6.0.0", + "cross-env": "^10.1.0", "jest": "^29.7.0", "semver-compare": "^1.0.0" },