Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: google/zx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 483cc88041feed8df4224860fdca1f76753eebf8
Choose a base ref
...
head repository: google/zx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7fa9bfc93c29436a250a28ed102f62e34fb95423
Choose a head ref
Loading
Showing with 2,578 additions and 8,781 deletions.
  1. +10 −10 .github/workflows/check.yml
  2. +6 −6 .github/workflows/dev-publish.yml
  3. +40 −0 .github/workflows/docs.yml
  4. +5 −3 .github/workflows/npm-publish.yml
  5. +57 −16 .github/workflows/test.yml
  6. +1 −1 .gitignore
  7. +0 −1 .prettierignore
  8. +3 −577 README.md
  9. +0 −27 docs/known-issues.md
  10. +0 −42 docs/markdown.md
  11. +0 −151 docs/process-promise.md
  12. +0 −75 docs/quotes.md
  13. +1 −1 examples/parallel.mjs
  14. +493 −6,739 package-lock.json
  15. +40 −33 package.json
  16. +86 −0 scripts/build-dts.mjs
  17. +124 −0 scripts/build-js.mjs
  18. +15 −12 src/cli.ts
  19. +267 −128 src/core.ts
  20. +18 −29 src/deps.ts
  21. +4 −1 src/globals.ts
  22. +15 −16 src/goods.ts
  23. +4 −3 src/index.ts
  24. +3 −4 src/repl.ts
  25. +40 −6 src/util.ts
  26. +59 −0 src/vendor.ts
  27. +0 −12 stryker.conf.json
  28. +9 −9 test/{experimental.test.js → all.test.js}
  29. +188 −184 test/cli.test.js
  30. +479 −381 test/core.test.js
  31. +80 −52 test/deps.test.js
  32. +35 −29 test/extra.test.js
  33. +57 −0 test/fixtures/js-project/package-lock.json
  34. +1 −1 test/fixtures/js-project/package.json
  35. +3 −3 test/fixtures/no-extension
  36. +2 −2 test/fixtures/ts-project/package.json
  37. +1 −1 test/fixtures/ts-project/script.ts
  38. +2 −2 test/fixtures/ts-project/tsconfig.json
  39. +15 −17 test/global.test.js
  40. +112 −97 test/goods.test.js
  41. +102 −0 test/index.test.js
  42. +31 −36 test/package.test.js
  43. +29 −0 test/smoke/bun.test.js
  44. +18 −3 src/experimental.ts → test/smoke/node-esm.test.js
  45. +10 −14 test/{ → smoke}/win32.test.js
  46. +110 −55 test/util.test.js
  47. +3 −2 tsconfig.json
20 changes: 10 additions & 10 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -6,15 +6,15 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build:check

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- uses: actions/checkout@v4
- run: npm ci
- run: npm run coverage
timeout-minutes: 1
env:
@@ -23,21 +23,21 @@ jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- uses: actions/checkout@v4
- run: npm ci
- run: npm run fmt:check

types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- run: npm run test:types

circular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm i
- uses: actions/checkout@v4
- run: npm ci
- run: npm run circular
12 changes: 6 additions & 6 deletions .github/workflows/dev-publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Dev Publish

on:
push:
branches:
- dev
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm i
- run: npm ci
- run: npm test
env:
FORCE_COLOR: 3
- run: echo "//wombat-dressing-room.appspot.com/:_authToken=$AUTH_TOKEN" >> .npmrc
env:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy docs

on:
push:
branches: ['gh-pages']
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install deps
run: npm ci
- name: Built docs
run: npm run docs:built
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
8 changes: 5 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -8,12 +8,14 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm i
- run: npm ci
- run: npm test
env:
FORCE_COLOR: 3
- run: echo "//wombat-dressing-room.appspot.com/:_authToken=$AUTH_TOKEN" >> .npmrc
env:
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
73 changes: 57 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -3,37 +3,78 @@ name: Test
on: [push, pull_request]

jobs:
test:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: build
path: |
build
package.json
retention-days: 1

test:
needs: build
runs-on: ubuntu-latest
env:
FORCE_COLOR: 3
strategy:
matrix:
node-version: [16.x, 18.x]

node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm test
- uses: actions/download-artifact@v4
with:
name: build
- run: npm ci
- name: run all tests
if: matrix.node-version == '20.x'
run: npm run test
- name: run unit tests
if: matrix.node-version != '20.x'
run: npm run test:unit
timeout-minutes: 1
env:
FORCE_COLOR: 3

win32:
smoke-win32-node16:
runs-on: windows-latest

needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
- run: npm i
- run: npm run build
- run: npx uvu test win32
- uses: actions/download-artifact@v4
with:
name: build
- run: npm run test:smoke:win32
timeout-minutes: 1
env:
FORCE_COLOR: 3

smoke-bun:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: antongolub/action-setup-bun@v1
- uses: actions/download-artifact@v4
with:
name: build
- run: bun test ./test/smoke/bun.test.js
timeout-minutes: 1
env:
FORCE_COLOR: 3
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@ build/
coverage/
package/
reports/
.stryker-tmp/
yarn.lock
test/fixtures/ts-project/package-lock.json
test/fixtures/js-project/package-lock.json
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ build/
coverage/
package/
reports/
.stryker-tmp/
package-lock.json
yarn.lock
*.md
Loading