Skip to content

Commit

Permalink
Merge pull request #866 from mountaindude/master
Browse files Browse the repository at this point in the history
Fix build script wrt changes related to the switch CJS > ESM
  • Loading branch information
mountaindude authored Aug 20, 2024
2 parents c9b6f6f + 55e618b commit 2c7a0d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/insiders-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
include:
- os: win-code-sign
build: |
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify
pkg --output "./${env:DIST_FILE_NAME}.exe" -t node18-win-x64 ./build.cjs --config package.json --compress GZip
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify --inject:./src/lib/import-meta-url.js --define:import.meta.url=import_meta_url
pkg --output "./${env:DIST_FILE_NAME}.exe" -t node18-win-x64 ./build.cjs --config package.json --options no-deprecation --compress GZip
dir
Expand Down Expand Up @@ -85,8 +85,8 @@ jobs:
artifact_insider: butler-sos--win-x64--${{ github.sha }}.zip
- os: mac-build1
build: |
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify
pkg --output "./${DIST_FILE_NAME}" -t node18-macos-x64 ./build.cjs --config package.json --compress GZip
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify --inject:./src/lib/import-meta-url.js --define:import.meta.url=import_meta_url
pkg --output "./${DIST_FILE_NAME}" -t node18-macos-x64 ./build.cjs --config package.json --options no-deprecation --compress GZip
chmod +x "${DIST_FILE_NAME}"
security delete-keychain build.keychain || true
Expand Down Expand Up @@ -147,8 +147,8 @@ jobs:
artifact_insider: butler-sos--macos-x64--${{ github.sha }}.zip
- os: ubuntu-latest
build: |
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify
pkg --output "./${DIST_FILE_NAME}" -t node18-linux-x64 ./build.cjs --config package.json --compress GZip
./node_modules/.bin/esbuild src/bundle.js --bundle --external:axios --external:xdg-open --external:enigma.js --outfile=build.cjs --format=cjs --platform=node --target=node18 --minify --inject:./src/lib/import-meta-url.js --define:import.meta.url=import_meta_url
pkg --output "./${DIST_FILE_NAME}" -t node18-linux-x64 ./build.cjs --config package.json --options no-deprecation --compress GZip
chmod +x ${DIST_FILE_NAME}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/import-meta-url.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/prefer-default-export, import/no-mutable-exports, no-var, camelcase, import/no-commonjs, global-require
export var import_meta_url = require('url').pathToFileURL(__filename);

0 comments on commit 2c7a0d7

Please sign in to comment.