-
-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: ESM, JS bindings, triple equals and general cleanup (#…
- Loading branch information
Showing
779 changed files
with
127,990 additions
and
251,587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
dist/ | ||
docs/ | ||
lib/binaryen.js | ||
lib/parse/index.js | ||
out/ | ||
build/ | ||
raw/ | ||
tests/parser/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
bin/* text eol=lf | ||
dist/* binary | ||
scripts/*.sh eol=lf | ||
lib/binaryen.js binary | ||
tests/compiler/std/string-encoding.ts eol=lf | ||
src/bindings/js.ts eol=lf | ||
src/bindings/tsd.ts eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,14 @@ jobs: | |
else | ||
printf "\nOK: Distributions files have not been modified.\n"; | ||
fi | ||
test: | ||
name: "Compiler (Linux, node ${{ matrix.node_version }})" | ||
runs-on: ubuntu-latest | ||
compiler: | ||
name: "Compiler (${{ matrix.os }}, node ${{ matrix.node_version }})" | ||
runs-on: ${{ matrix.os }}-latest | ||
needs: check | ||
strategy: | ||
matrix: | ||
os: ["ubuntu", "macos"] | ||
# TODO: re-enable "windows", see https://github.com/npm/cli/issues/4234 | ||
node_version: ["current", "lts_latest"] | ||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -34,87 +36,33 @@ jobs: | |
node-version: ${{ matrix.node_version }} | ||
- name: Install dependencies | ||
run: npm ci --no-audit | ||
- name: Clean distribution files | ||
run: npm run clean | ||
- name: Check sources | ||
run: npm run check | ||
- name: Test sources | ||
run: npm test | ||
- name: Build distribution files | ||
- name: Build | ||
run: npm run build | ||
- name: Update entry file | ||
run: npm run prepare-ci | ||
- name: Test distribution | ||
run: npm test | ||
- name: Test browser build | ||
run: node tests/browser-asc | ||
# see: https://github.com/npm/cli/issues/4234 | ||
# test-windows: | ||
# name: "Compiler (Windows, node current)" | ||
# runs-on: windows-latest | ||
# needs: check | ||
# steps: | ||
# - uses: actions/[email protected] | ||
# - uses: dcodeIO/setup-node-nvm@master | ||
# with: | ||
# node-version: current | ||
# - name: Install dependencies | ||
# run: npm ci --no-audit | ||
# - name: Clean distribution files | ||
# run: npm run clean | ||
# - name: Test sources | ||
# run: npm test | ||
# - name: Build distribution files | ||
# run: npm run build | ||
# - name: Update entry file | ||
# run: npm run prepare-ci | ||
# - name: Test distribution | ||
# run: npm test | ||
# - name: Test browser build | ||
# run: node tests/browser-asc | ||
test-macos: | ||
name: "Compiler (MacOS, node current)" | ||
runs-on: macos-latest | ||
needs: check | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: dcodeIO/setup-node-nvm@master | ||
with: | ||
node-version: current | ||
- name: Install dependencies | ||
run: npm ci --no-audit | ||
- name: Clean distribution files | ||
run: npm run clean | ||
- name: Test sources | ||
run: npm test | ||
- name: Build distribution files | ||
run: npm run build | ||
- name: Update entry file | ||
run: npm run prepare-ci | ||
- name: Test distribution | ||
- name: Check | ||
run: npm run check | ||
- name: Test | ||
run: npm test | ||
- name: Test browser build | ||
run: node tests/browser-asc | ||
test-bootstrap: | ||
name: "Compiler (Bootstrap)" | ||
bootstrap: | ||
name: "Bootstrap (${{ matrix.target }})" | ||
runs-on: ubuntu-latest | ||
needs: check | ||
strategy: | ||
matrix: | ||
target: ["debug", "release"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: dcodeIO/setup-node-nvm@master | ||
with: | ||
node-version: current | ||
- name: Install dependencies | ||
run: npm ci --no-audit | ||
- name: Clean distribution files | ||
run: npm run clean | ||
- name: Bootstrap the compiler | ||
run: npm run bootstrap | ||
- name: Run compiler tests (untouched-bootstrap) | ||
run: npm run test:compiler -- --wasm out/assemblyscript.untouched-bootstrap.wasm | ||
- name: Run compiler tests (optimized-bootstrap) | ||
run: npm run test:compiler -- --wasm out/assemblyscript.optimized-bootstrap.wasm | ||
test-features: | ||
- name: Build | ||
run: npm run build | ||
- name: Bootstrap | ||
run: npm run bootstrap:${{ matrix.target }} | ||
- name: Test | ||
run: npm run test:compiler -- --wasm build/assemblyscript.${{ matrix.target }}-bootstrap.js | ||
features: | ||
name: "Features" | ||
runs-on: ubuntu-latest | ||
needs: check | ||
|
@@ -126,14 +74,14 @@ jobs: | |
node-version: 18.0.0-v8-canary20211115037fd7ae8d | ||
- name: Install dependencies | ||
run: npm ci --no-audit | ||
- name: Clean distribution files | ||
run: npm run clean | ||
- name: Build | ||
run: npm run build | ||
- name: Test experimental features | ||
env: | ||
ASC_FEATURES: threads,reference-types,bigint-integration,gc | ||
ASC_FEATURES: threads,reference-types,gc,exception-handling | ||
run: | | ||
npm run test:compiler rt/flags features/js-bigint-integration features/reference-types features/threads std-wasi/process std-wasi/crypto | ||
test-runtimes: | ||
npm run test:compiler features/threads features/reference-types features/gc features/exception-handling | ||
runtimes: | ||
name: "Runtimes" | ||
runs-on: ubuntu-latest | ||
needs: check | ||
|
@@ -144,8 +92,8 @@ jobs: | |
node-version: current | ||
- name: Install dependencies | ||
run: npm ci --no-audit | ||
- name: Clean distribution files | ||
run: npm run clean | ||
- name: Build | ||
run: npm run build | ||
- name: Test default allocator | ||
run: | | ||
cd tests/allocators/default | ||
|
@@ -158,7 +106,7 @@ jobs: | |
npm run build | ||
cd .. | ||
npm test stub | ||
test-loader: | ||
loader: | ||
name: "Loader" | ||
runs-on: ubuntu-latest | ||
needs: check | ||
|
@@ -169,8 +117,8 @@ jobs: | |
node-version: current | ||
- name: Install dependencies | ||
run: npm ci --no-audit | ||
- name: Clean distribution files | ||
run: npm run clean | ||
- name: Build | ||
run: npm run build | ||
- name: Test the loader | ||
run: | | ||
cd lib/loader | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
npm-debug.* | ||
dist/ | ||
docs/ | ||
node_modules/ | ||
out/ | ||
*debug.log | ||
dist/ | ||
build/ | ||
raw/ | ||
.history | ||
*.backup | ||
.vscode | ||
.idea | ||
cli/index.generated.js | ||
src/diagnosticMessages.generated.ts |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env node | ||
|
||
const [ nodePath, thisPath, ...args ] = process.argv; | ||
const nodeArgs = process.execArgv; | ||
|
||
const hasSourceMaps = nodeArgs.includes("--enable-source-maps"); | ||
const posCustomArgs = args.indexOf("--"); | ||
const isDeno = typeof Deno !== "undefined"; | ||
|
||
if (isDeno) { | ||
process.on = function() { /* suppress 'not implemented' message */ }; | ||
} | ||
|
||
if ((!hasSourceMaps || ~posCustomArgs) && !isDeno) { | ||
if (!hasSourceMaps) { | ||
nodeArgs.push("--enable-source-maps"); | ||
} | ||
if (~posCustomArgs) { | ||
nodeArgs.push(...args.slice(posCustomArgs + 1)); | ||
args.length = posCustomArgs; | ||
} | ||
(await import("child_process")).spawnSync( | ||
nodePath, | ||
[...nodeArgs, thisPath, ...args], | ||
{ stdio: "inherit" } | ||
); | ||
} else { | ||
const { error } = (await import("../dist/asc.js")).main(process.argv.slice(2), { | ||
stdout: process.stdout, | ||
stderr: process.stderr | ||
}); | ||
if (error) process.exitCode = 1; | ||
} |
Oops, something went wrong.