Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Drop references to Node < 8
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Apr 11, 2021
1 parent 247d1d5 commit 6ecd52a
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 117 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -42,13 +42,13 @@ The entrypoint of your project is a mandatory CLI argument. It may be:
`pkg` can generate executables for several target machines at a
time. You can specify a comma-separated list of targets via `--targets`
option. A canonical target consists of 3 elements, separated by
dashes, for example `node6-macos-x64` or `node4-linux-armv6`:
dashes, for example `node12-macos-x64` or `node14-linux-arm64`:

- **nodeRange** node${n} or latest
- **platform** freebsd, linux, alpine, macos, win
- **arch** x64, x86, armv6, armv7
- **platform** linux, win, macos, (freebsd, alpine)
- **arch** x64, arm64, (armv6, armv7)

You may omit any element (and specify just `node6` for example).
You may omit any element (and specify just `node14` for example).
The omitted elements will be taken from current platform or
system-wide Node.js installation (its version and arch).
There is also an alias `host`, that means that all 3 elements
Expand Down Expand Up @@ -79,13 +79,13 @@ your `package.json` file.
"pkg": {
"scripts": "build/**/*.js",
"assets": "views/**/*",
"targets": [ "node4-linux-armv6" ],
"targets": [ "node14-linux-arm64" ],
"outputPath": "dist"
}
```

The above example will include everything in `assets/` and
every .js file in `build/`, build only for `node4-linux-armv6`,
every .js file in `build/`, build only for `node14-linux-arm64`,
and place the executable inside `dist/`.

You may also specify arrays of globs:
Expand Down
4 changes: 2 additions & 2 deletions lib/help.ts
Expand Up @@ -25,9 +25,9 @@ export default function help() {
${chalk.gray('–')} Takes package.json from cwd and follows 'bin' entry
${chalk.cyan('$ pkg .')}
${chalk.gray('–')} Makes executable for particular target machine
${chalk.cyan('$ pkg -t node6-alpine-x64 index.js')}
${chalk.cyan('$ pkg -t node14-win-arm64 index.js')}
${chalk.gray('–')} Makes executables for target machines of your choice
${chalk.cyan('$ pkg -t node4-linux,node6-linux,node6-win index.js')}
${chalk.cyan('$ pkg -t node12-linux,node14-linux,node14-win index.js')}
${chalk.gray('–')} Bakes '--expose-gc' into executable
${chalk.cyan('$ pkg --options expose-gc index.js')}
`);
Expand Down
7 changes: 2 additions & 5 deletions test/test-42-fetch-all/main.js
Expand Up @@ -15,15 +15,12 @@ function nodeRangeToNodeVersion(nodeRange) {

for (const platform of knownPlatforms) {
const nodeRanges = ['node8', 'node10', 'node12'];
if (platform === 'linux' || platform === 'alpine')
nodeRanges.unshift('node6');
if (platform === 'linux') nodeRanges.unshift('node4');
for (const nodeRange of nodeRanges) {
const nodeVersion = nodeRangeToNodeVersion(nodeRange);
const archs = ['x64'];
if (platform === 'win') archs.unshift('x86');
if (platform === 'linux') archs.push('armv7');
// linux-armv7 is needed in multi-arch tests,
if (platform === 'linux') archs.push('arm64');
// linux-arm64 is needed in multi-arch tests,
// so keeping it here as obligatory. but let's
// leave compiling for freebsd to end users
if (platform === 'freebsd') continue;
Expand Down
40 changes: 0 additions & 40 deletions test/test-50-reject-4/main.js

This file was deleted.

7 changes: 0 additions & 7 deletions test/test-50-reject-4/test-x-index.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/test-50-reject-4/test-x-warmup.js

This file was deleted.

40 changes: 0 additions & 40 deletions test/test-50-reject-6/main.js

This file was deleted.

11 changes: 0 additions & 11 deletions test/test-50-reject-6/test-x-index.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/test-50-reject-6/test-x-warmup.js

This file was deleted.

0 comments on commit 6ecd52a

Please sign in to comment.