Skip to content

Commit

Permalink
Merge pull request #155 from justjake/jake--libraryVersionBump
Browse files Browse the repository at this point in the history
Update to latest QuickJS and QuickJS-NG
  • Loading branch information
justjake authored Feb 11, 2024
2 parents a698c9a + 2f4242f commit 132fe1f
Show file tree
Hide file tree
Showing 158 changed files with 7,771 additions and 2,934 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
node-version: 18

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# We need `git log` to find git-subtree versions
fetch-depth: 0

- name: Yarn cache
uses: actions/cache@v3
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v0.28.0 (unreleased)

- [#155] Update library versions and add versions to documentation.
- quickjs version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.
- Evaluating a ES Module with `context.evalCode(...)` now returns a Promise object instead of `undefined`.
- quickjs-ng version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## v0.27.0

- [#147] Support providing and retrieving WebAssembly.Memory
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ to build the C code. The Makefile is generated from a template in ./templates/Va

Related NPM scripts:

- `yarn update-quickjs` will sync the ./quickjs folder with a github repo tracking the upstream QuickJS.
- `yarn vendor:update` updates vendor/quickjs and vendor/quickjs-ng to the latest versions on Github.
- `yarn build:codegen` updates the ./packages from the template script `./prepareVariants.ts` and Variant.mk.
- `yarn build:packages` builds the variant packages in parallel.

Expand Down
4 changes: 3 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ This variant was built with the following settings:

## Library: quickjs-ng

[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features.
[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly.

Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: debug

Expand Down
3 changes: 2 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-debug-asyncify/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs-ng | [quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly. Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
| syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
| emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
| exports | require import browser workerd | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-asyncify/src/index.ts#L18)

***

Expand Down
4 changes: 3 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-debug-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ This variant was built with the following settings:

## Library: quickjs-ng

[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features.
[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly.

Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: debug

Expand Down
3 changes: 2 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-debug-sync/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs-ng | [quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly. Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
| syncMode | sync | The default, normal build. Note that both variants support regular async functions. |
| emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
| exports | require import browser workerd | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-debug-sync/src/index.ts#L18)

***

Expand Down
4 changes: 3 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-release-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ This variant was built with the following settings:

## Library: quickjs-ng

[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features.
[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly.

Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: release

Expand Down
3 changes: 2 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-release-asyncify/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs-ng | [quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly. Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | release | Optimized for performance; use when building/deploying your application. |
| syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
| emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
| exports | require import browser workerd | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-asyncify/src/index.ts#L18)

***

Expand Down
4 changes: 3 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-release-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ This variant was built with the following settings:

## Library: quickjs-ng

[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a newer fork of quickjs with more language features.
[quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly.

Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: release

Expand Down
3 changes: 2 additions & 1 deletion doc/@jitl/quickjs-ng-wasmfile-release-sync/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS C

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs-ng | [quickjs-ng](https://github.com/quickjs-ng/quickjs) is a fork of quickjs that tends to add features more quickly. Version [git+229b07b9](https://github.com/quickjs-ng/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | release | Optimized for performance; use when building/deploying your application. |
| syncMode | sync | The default, normal build. Note that both variants support regular async functions. |
| emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
| exports | require import browser workerd | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-ng-wasmfile-release-sync/src/index.ts#L18)

***

Expand Down
2 changes: 2 additions & 0 deletions doc/@jitl/quickjs-singlefile-browser-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This variant was built with the following settings:

The original [bellard/quickjs](https://github.com/bellard/quickjs) library.

Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: debug

Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with the WASM data embedded into a browser ESModule.

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
| syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
| emscriptenInclusion | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. |
| exports | browser | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-asyncify/src/index.ts#L18)

***

Expand Down
2 changes: 2 additions & 0 deletions doc/@jitl/quickjs-singlefile-browser-debug-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This variant was built with the following settings:

The original [bellard/quickjs](https://github.com/bellard/quickjs) library.

Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: debug

Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs.
Expand Down
3 changes: 2 additions & 1 deletion doc/@jitl/quickjs-singlefile-browser-debug-sync/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with the WASM data embedded into a browser ESModule.

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | debug | Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs. |
| syncMode | sync | The default, normal build. Note that both variants support regular async functions. |
| emscriptenInclusion | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. |
| exports | browser | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-debug-sync/src/index.ts#L18)

***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This variant was built with the following settings:

The original [bellard/quickjs](https://github.com/bellard/quickjs) library.

Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: release

Optimized for performance; use when building/deploying your application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with the WASM data embedded into a browser ESModule.

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | release | Optimized for performance; use when building/deploying your application. |
| syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
| emscriptenInclusion | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. |
| exports | browser | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-asyncify/src/index.ts#L18)

***

Expand Down
2 changes: 2 additions & 0 deletions doc/@jitl/quickjs-singlefile-browser-release-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This variant was built with the following settings:

The original [bellard/quickjs](https://github.com/bellard/quickjs) library.

Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: release

Optimized for performance; use when building/deploying your application.
Expand Down
3 changes: 2 additions & 1 deletion doc/@jitl/quickjs-singlefile-browser-release-sync/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Variant with the WASM data embedded into a browser ESModule.

| Variable | Setting | Description |
| -- | -- | -- |
| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11. |
| releaseMode | release | Optimized for performance; use when building/deploying your application. |
| syncMode | sync | The default, normal build. Note that both variants support regular async functions. |
| emscriptenInclusion | singlefile | The WASM runtime is included directly in the JS file. Use if you run into issues with missing .wasm files when building or deploying your app. |
| exports | browser | Has these package.json export conditions |

#### Source

[index.ts:17](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts#L17)
[index.ts:18](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-singlefile-browser-release-sync/src/index.ts#L18)

***

Expand Down
2 changes: 2 additions & 0 deletions doc/@jitl/quickjs-singlefile-cjs-debug-asyncify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ This variant was built with the following settings:

The original [bellard/quickjs](https://github.com/bellard/quickjs) library.

Version [2024-01-13+229b07b9](https://github.com/bellard/quickjs/commit/229b07b9b2c811eaf84db209a1d6f9e2a8a7b0d9) vendored to quickjs-emscripten on 2024-02-11.

## Release mode: debug

Enables assertions and memory sanitizers. Try to run your tests against debug variants, in addition to your preferred production variant, to catch more bugs.
Expand Down
Loading

0 comments on commit 132fe1f

Please sign in to comment.