Skip to content

BREAKING CHANGE: ESM, JS bindings, triple equals and general cleanup #2157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 184 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
7dab337
work
dcodeIO Nov 26, 2021
cba554c
Merge branch 'main' into esm
dcodeIO Nov 26, 2021
2194988
remove unused dependencies
dcodeIO Nov 26, 2021
83b659f
various fixes
dcodeIO Nov 26, 2021
14eedb6
update allocator and loader tests
dcodeIO Nov 26, 2021
ff9e30b
integrate diagnostics into build
dcodeIO Nov 26, 2021
df44d47
update binaryen to latest
dcodeIO Nov 27, 2021
7715882
clean up scripts
dcodeIO Nov 27, 2021
7b89619
restructure
dcodeIO Nov 27, 2021
a0b5077
restructure
dcodeIO Nov 27, 2021
10699dd
restructure
dcodeIO Nov 27, 2021
0fba4d3
update instructions
dcodeIO Nov 27, 2021
1bee659
update instructions
dcodeIO Nov 27, 2021
4492b4a
remove generated files from source control
dcodeIO Nov 27, 2021
d048c1e
readit
dcodeIO Nov 27, 2021
d3a1274
remove old binaryen tests
dcodeIO Nov 27, 2021
c6557b0
remove rogue file
dcodeIO Nov 27, 2021
281ae4d
remove old path test
dcodeIO Nov 27, 2021
592f503
refactor browser test
dcodeIO Nov 27, 2021
4f932b2
readthat
dcodeIO Nov 27, 2021
4faba35
update options test
dcodeIO Nov 27, 2021
479aff4
update dts generation
dcodeIO Nov 27, 2021
84ccac4
link asc to as defs
dcodeIO Nov 27, 2021
a3d4531
put it all together
dcodeIO Nov 27, 2021
78dbabd
work around ambient <-> esm name clashing
dcodeIO Nov 27, 2021
28e7791
share common types namespace
dcodeIO Nov 27, 2021
9165068
simplify
dcodeIO Nov 27, 2021
4076286
update transform
dcodeIO Nov 27, 2021
3f9223d
remove unnecessary line
dcodeIO Nov 27, 2021
1b51772
fix
dcodeIO Nov 27, 2021
35a1e12
fix
dcodeIO Nov 27, 2021
02dc4a1
restructure
dcodeIO Nov 28, 2021
a4d1958
fix
dcodeIO Nov 28, 2021
4bb1814
fix
dcodeIO Nov 28, 2021
cdf107f
readme
dcodeIO Nov 28, 2021
ce914fc
update dependencies
dcodeIO Nov 28, 2021
8c59d2b
make it work in browsers
dcodeIO Nov 28, 2021
15c5044
remove unnecessary check
dcodeIO Nov 28, 2021
fae90f8
use relative paths
dcodeIO Nov 28, 2021
b57b1d8
simplify building / watching
dcodeIO Nov 28, 2021
41c2bb1
readmes
dcodeIO Nov 28, 2021
8ef9ce2
readme
dcodeIO Nov 28, 2021
0aeafb4
sdk is just an html file now
dcodeIO Nov 28, 2021
f6a5385
remove old sdk
dcodeIO Nov 28, 2021
9b5aeb7
remove outdated lib/webpack
dcodeIO Nov 28, 2021
f6e70d7
tidy more
dcodeIO Nov 29, 2021
d867b23
fix?
dcodeIO Nov 29, 2021
c47d4a5
less
dcodeIO Nov 29, 2021
2c4ad81
more
dcodeIO Nov 29, 2021
fa6150b
now?
dcodeIO Nov 29, 2021
a5610fa
moremore
dcodeIO Nov 29, 2021
d3d3096
package as well
dcodeIO Nov 29, 2021
69cbdbc
dot
dcodeIO Nov 29, 2021
d6112aa
move CODE_OF_CONDUCT to org
dcodeIO Nov 29, 2021
790a1c0
more
dcodeIO Nov 29, 2021
90df2b3
nah
dcodeIO Nov 29, 2021
193baaa
use native source map support
dcodeIO Nov 29, 2021
39951d6
also in tests
dcodeIO Nov 29, 2021
6620f77
proxy binaryen
dcodeIO Nov 29, 2021
2598e71
fix
dcodeIO Nov 29, 2021
e4e239e
cli as well
dcodeIO Nov 29, 2021
cd66585
readme
dcodeIO Nov 29, 2021
da61ab0
readme
dcodeIO Nov 29, 2021
c36dafb
make asc.main async
dcodeIO Nov 30, 2021
3845795
split bootstrap tests
dcodeIO Nov 30, 2021
e09ec02
sync api and readme
dcodeIO Nov 30, 2021
1db68bd
split test as well?
dcodeIO Nov 30, 2021
0a9a1a2
update compileString, accept options object in main
dcodeIO Nov 30, 2021
b54aefe
propagate fs.promises
dcodeIO Nov 30, 2021
9877cb7
unify
dcodeIO Nov 30, 2021
d46bee7
wait for pending operations to settle
dcodeIO Nov 30, 2021
8fa2845
?
dcodeIO Nov 30, 2021
fca4666
fix
dcodeIO Nov 30, 2021
cbbd064
tidy ci
dcodeIO Nov 30, 2021
0446963
things
dcodeIO Nov 30, 2021
502d1b9
fix
dcodeIO Nov 30, 2021
395f4a9
drawing boxes
dcodeIO Nov 30, 2021
3d071a9
update dts
dcodeIO Dec 1, 2021
b96f9d3
remove dead rc tests
dcodeIO Dec 1, 2021
d039865
refactor
dcodeIO Dec 2, 2021
b84e976
Merge branch 'main' into esm
dcodeIO Dec 2, 2021
8b1ae12
update binaryen and fixtures
dcodeIO Dec 2, 2021
75e76f4
Merge branch 'main' into esm
dcodeIO Dec 2, 2021
0a93d92
exclude 'debug.log'
dcodeIO Dec 2, 2021
25ec2cd
Merge branch 'main' into esm
dcodeIO Dec 2, 2021
eac6b31
more
dcodeIO Dec 2, 2021
416d734
drop webidl and asm.js
dcodeIO Dec 3, 2021
c2f5f32
support ESM and CJS transforms
dcodeIO Dec 3, 2021
eda668e
support async transforms
dcodeIO Dec 3, 2021
0492055
update definitions
dcodeIO Dec 3, 2021
5d0b109
can't even test this snap stuff
dcodeIO Dec 3, 2021
272461a
still no idea
dcodeIO Dec 3, 2021
40679b5
update binaryen
dcodeIO Dec 3, 2021
1c40822
fix fs/url shim
dcodeIO Dec 3, 2021
34b7c55
test more of transform
dcodeIO Dec 3, 2021
3c73d15
Update cli/index.d.ts
dcodeIO Dec 3, 2021
2b2ae1d
Update cli/index.d.ts
dcodeIO Dec 3, 2021
14c25d9
more
dcodeIO Dec 3, 2021
0ba9dcf
Update cli/index.js
dcodeIO Dec 3, 2021
850ec4b
more
dcodeIO Dec 3, 2021
046d8e7
more
dcodeIO Dec 3, 2021
4fd9050
manually sync esbuild version
dcodeIO Dec 3, 2021
43ecbe8
invert asc stdout/stderr default to memory stream
dcodeIO Dec 3, 2021
abc1d81
more
dcodeIO Dec 3, 2021
67f4b84
delete snap, probably not good ux anyway
dcodeIO Dec 3, 2021
d08c3dd
defer building definitions on first run
dcodeIO Dec 3, 2021
94c4f37
use promise defer
dcodeIO Dec 4, 2021
31702c6
undo reporter flag
dcodeIO Dec 4, 2021
02972f8
move parse to examples
dcodeIO Dec 4, 2021
5b3f24a
Merge branch 'main' into esm
dcodeIO Dec 6, 2021
5c383f1
enable incremental builds when watching
dcodeIO Dec 7, 2021
e39d9ae
harden transforms
dcodeIO Dec 7, 2021
d46eb68
make sure it's super duper
dcodeIO Dec 7, 2021
0eba569
did this even exist by then
dcodeIO Dec 7, 2021
2f1eb73
modernize
dcodeIO Dec 7, 2021
5706912
delete old packages tests
dcodeIO Dec 9, 2021
3900ef8
remove ascMain, add new tests
dcodeIO Dec 9, 2021
090ce5c
fix
dcodeIO Dec 9, 2021
096a77c
fix
dcodeIO Dec 9, 2021
88b31bf
fix, remove --extension
dcodeIO Dec 9, 2021
2b2aee8
Merge branch 'main' into esm
dcodeIO Dec 9, 2021
7fb896a
update fixture
dcodeIO Dec 9, 2021
6a711e7
fix?
dcodeIO Dec 9, 2021
34b1212
nuke more options
dcodeIO Dec 9, 2021
81ef128
update Binaryen
dcodeIO Dec 9, 2021
40dceea
rename --measure to --stats
dcodeIO Dec 9, 2021
8182779
fix unknown option warning
dcodeIO Dec 9, 2021
541a1cd
fix
dcodeIO Dec 9, 2021
9dfcd7c
Merge branch 'main' into esm
dcodeIO Dec 10, 2021
15c47ea
use incremental in cli build as well
dcodeIO Dec 11, 2021
c839986
better
dcodeIO Dec 11, 2021
1d3c4be
Update cli/README.md
dcodeIO Dec 12, 2021
0ff0820
Update cli/index.js
dcodeIO Dec 12, 2021
2b6428f
Update tests/allocators/default/package.json
dcodeIO Dec 12, 2021
e17a6ca
Update cli/index.d.ts
dcodeIO Dec 12, 2021
9468996
Merge branch 'main' into esm
dcodeIO Dec 13, 2021
556f0df
sync fixtures
dcodeIO Dec 13, 2021
df054ba
more measure -> stats
dcodeIO Dec 13, 2021
83e0632
explicitStart -> exportStart
dcodeIO Dec 13, 2021
931495d
lint
dcodeIO Dec 13, 2021
3a83bb0
enable various features
dcodeIO Dec 14, 2021
23b5f9e
move enabled feature tests
dcodeIO Dec 14, 2021
a69cffd
update CI
dcodeIO Dec 14, 2021
9da0fdd
keep simd behind a flag for now
dcodeIO Dec 14, 2021
e2ac2d3
add timing util
dcodeIO Dec 14, 2021
75328a9
tackle === vs ==
dcodeIO Dec 15, 2021
1722afa
unify
dcodeIO Dec 15, 2021
337c826
update binaryen
dcodeIO Dec 15, 2021
47f4eb4
add total time to stats
dcodeIO Dec 15, 2021
e25ca01
comment
dcodeIO Dec 15, 2021
cc1bd11
same
dcodeIO Dec 15, 2021
05913bf
account for usize ptr, refactor
dcodeIO Dec 15, 2021
1dadb87
minor
dcodeIO Dec 15, 2021
634e414
preserve side effects in 'constant' type checks
dcodeIO Dec 16, 2021
c6590de
remove invalid comment
dcodeIO Dec 16, 2021
9cc6962
initial bindings
dcodeIO Jan 9, 2022
772df6f
fixes
dcodeIO Jan 9, 2022
0787128
bootstrap fixes
dcodeIO Jan 9, 2022
61da567
fix
dcodeIO Jan 9, 2022
bc7973e
disable class/namespace loader tests
dcodeIO Jan 9, 2022
af1b4fa
rename untouched/optimized to debug/release
dcodeIO Jan 9, 2022
2c2ec07
improve typings
dcodeIO Jan 10, 2022
fb6bc87
some Deno compatibility for asc
dcodeIO Jan 10, 2022
74f744c
update Binaryen
dcodeIO Jan 18, 2022
3186d99
?
dcodeIO Jan 18, 2022
07609a7
??
dcodeIO Jan 18, 2022
2033e2d
disable on windows?
dcodeIO Jan 18, 2022
63ed838
add a comment
dcodeIO Jan 18, 2022
270a01b
move loader docs to its readme (is now deprecated)
dcodeIO Jan 19, 2022
bd22829
move development instructions to readme
dcodeIO Jan 26, 2022
b1870ce
add experimental `module` specifier
dcodeIO Jan 27, 2022
b17cefb
update Binaryen (no fixture changes)
dcodeIO Jan 27, 2022
b163bd5
update asinit
dcodeIO Jan 27, 2022
a223638
don't need a top-level index.js anymore
dcodeIO Jan 27, 2022
b9120d1
update link to docs
dcodeIO Jan 27, 2022
cc45b9e
export types
dcodeIO Jan 27, 2022
628bd8e
simplify
dcodeIO Jan 28, 2022
d7a4404
simplify
dcodeIO Jan 29, 2022
5bfaa99
make console/crypto/process usable with bindings
dcodeIO Jan 30, 2022
45f4ee8
reorganize some bindings
dcodeIO Feb 10, 2022
4721a2c
update dependencies
dcodeIO Mar 6, 2022
70e9b88
Merge branch 'main' into esm
dcodeIO Mar 6, 2022
ef60e80
bindings fixes
dcodeIO Mar 20, 2022
ded520a
update features
dcodeIO Mar 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .eslintignore
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/

Expand Down
12 changes: 9 additions & 3 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global module */

module.exports = {
root: true,
parser: "@typescript-eslint/parser",
Expand All @@ -15,9 +17,14 @@ module.exports = {
ecmaFeatures: {}
},
globals: {
"globalThis": "readonly",
"BigInt64Array": "readonly",
"BigUint64Array": "readonly",
"__non_webpack_require__": "readonly"
"WebAssembly": "readonly",
"FinalizationRegistry": "readonly",
"fetch": "readonly",
"URL": "readonly",
"console": "readonly"
},

// === General rules =========================================================
Expand Down Expand Up @@ -218,8 +225,7 @@ module.exports = {

{
files: [
"./index.d.ts",
"./index.release.d.ts",
"./dist/*.d.ts"
],
rules: {
// Our definitions are complicated, and all attempts to describe them
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
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
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
node ./scripts/prepublish
if [ $(node -pe "require('./package.json').version") != "0.0.0" ]; then
npx aspublish
fi
Expand All @@ -59,3 +60,4 @@ jobs:
npm publish --access public
fi
cd ../..
node ./scripts/prepublish --reset
114 changes: 31 additions & 83 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/checkout@v1.0.0
Expand All @@ -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/checkout@v1.0.0
# - 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/checkout@v1.0.0
- 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/checkout@v1.0.0
- 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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -158,7 +106,7 @@ jobs:
npm run build
cd ..
npm test stub
test-loader:
loader:
name: "Loader"
runs-on: ubuntu-latest
needs: check
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
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
46 changes: 0 additions & 46 deletions CODE_OF_CONDUCT.md

This file was deleted.

19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,25 @@

<h2 align="center">Thanks to our sponsors!</h2>

<p align="justify">Most of the core team members and most contributors do this open source work in their free time. If you use AssemblyScript for a serious task or plan to do so, and you'd like us to invest more time on it, <a href="https://opencollective.com/assemblyscript/donate" target="_blank" rel="noopener">please donate</a> to our <a href="https://opencollective.com/assemblyscript" target="_blank" rel="noopener">OpenCollective</a>. By sponsoring this project, your logo will show up below. Thank you so much for your support!</p>
<p align="justify">Most of the maintainers and contributors do this open source work in their free time. If you use AssemblyScript for a serious task or plan to do so, and you'd like us to invest more time on it, <a href="https://opencollective.com/assemblyscript/donate" target="_blank" rel="noopener">please donate</a> to our <a href="https://opencollective.com/assemblyscript" target="_blank" rel="noopener">OpenCollective</a>. By sponsoring this project, your logo will show up below. Thank you so much for your support!</p>

<p align="center">
<a href="https://assemblyscript.org/#sponsors"><img src="https://assemblyscript.org/sponsors.svg" alt="Sponsor logos" width="720" /></a>
</p>

## Development instructions

A development environment can be set up by cloning the repository:

```sh
git clone https://github.com/AssemblyScript/assemblyscript.git
cd assemblyscript
npm install
npm link
```

The link step is optional and makes the development instance available globally. The full process is documented as part of the repository:

* [Compiler instructions](./src)
* [Runtime instructions](./std/assembly/rt)
* [Test instructions](./tests)
20 changes: 0 additions & 20 deletions bin/asc

This file was deleted.

33 changes: 33 additions & 0 deletions bin/asc.js
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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does pos stand for?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, piece of poo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stands for position here. Would you like it to be changed?

if (!hasSourceMaps) {
nodeArgs.push("--enable-source-maps");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why support the option if it is always enabled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, it's not AS-specific, we just always want Node to have it enabled.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, previously was using an npm package for source map support, but recent Node has this option which works better. In particular, when crashing, this produces a proper trace instead of a lot of gibberish.

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;
}
Loading