Skip to content

Commit

Permalink
Change main branch name to main (bellard#63)
Browse files Browse the repository at this point in the history
* replace master -> main

* yarn doc

* rebuild
  • Loading branch information
justjake authored May 31, 2022
1 parent ff21144 commit 3702dfc
Show file tree
Hide file tree
Showing 46 changed files with 397 additions and 326 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# events but only for the main branch
on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ main()

[github]: https://github.com/justjake/quickjs-emscripten
[npm]: https://www.npmjs.com/package/quickjs-emscripten
[api]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md
[tests]: https://github.com/justjake/quickjs-emscripten/blob/master/ts/quickjs.test.ts
[api]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md
[tests]: https://github.com/justjake/quickjs-emscripten/blob/main/ts/quickjs.test.ts
[values]: #interfacing-with-the-interpreter
[asyncify]: #asyncify
[functions]: #exposing-apis
Expand All @@ -57,7 +57,7 @@ function to directly access the singleton engine in your synchronous code.

### Safely evaluate Javascript code

See [QuickJS.evalCode](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/quickjs.md#evalcode)
See [QuickJS.evalCode](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/quickjs.md#evalcode)

```typescript
import { getQuickJS, shouldInterruptAfterDeadline } from "quickjs-emscripten"
Expand All @@ -73,7 +73,7 @@ getQuickJS().then((QuickJS) => {

### Interfacing with the interpreter

You can use [QuickJSContext](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/QuickJSContext.md)
You can use [QuickJSContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/QuickJSContext.md)
to build a scripting environment by modifying globals and exposing functions
into the QuickJS interpreter.

Expand All @@ -82,7 +82,7 @@ classes -- and actions from one context won't leak into other contexts or
runtimes (with one exception, see [Asyncify][asyncify]).

Every context is created inside a
[QuickJSRuntime](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/QuickJSRuntime.md).
[QuickJSRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/QuickJSRuntime.md).
A runtime represents a Javascript heap, and you can even share values between
contexts in the same runtime.

Expand Down Expand Up @@ -164,7 +164,7 @@ handle you create:
#### Scope

A
[`Scope`](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/scope.md#class-scope)
[`Scope`](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/scope.md#class-scope)
instance manages a set of disposables and calls their `.dispose()`
method in the reverse order in which they're added to the scope. Here's the
"Interfacing with the interpreter" example re-written using `Scope`:
Expand Down Expand Up @@ -195,7 +195,7 @@ calling `scope.dispose()` yourself.

#### `Lifetime.consume(fn)`

[`Lifetime.consume`](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/lifetime.md#consume)
[`Lifetime.consume`](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/lifetime.md#consume)
is sugar for the common pattern of using a handle and then
immediately disposing of it. `Lifetime.consume` takes a `map` function that
produces a result of any type. The `map` fuction is called with the handle,
Expand Down Expand Up @@ -353,9 +353,9 @@ To use asyncify features, use the following functions:
WebAssembly module.
- [newQuickJSAsyncWASMModule][]: create an empty WebAssembly module.

[newasyncruntime]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#newasyncruntime
[newasynccontext]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#newasynccontext
[newquickjsasyncwasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#newquickjsasyncwasmmodule
[newasyncruntime]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newasyncruntime
[newasynccontext]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newasynccontext
[newquickjsasyncwasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newquickjsasyncwasmmodule

These functions are asynchronous because they always create a new underlying
WebAssembly module so that each instance can suspend and resume independently,
Expand Down Expand Up @@ -483,9 +483,9 @@ describe("Realistic test with QuickJS RELEASE build", () => {

For more testing examples, please explore the typescript source of [quickjs-emscripten][ts] repository.

[ts]: https://github.com/justjake/quickjs-emscripten/blob/master/ts
[debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#debug_sync
[testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/TestQuickJSWASMModule.md
[ts]: https://github.com/justjake/quickjs-emscripten/blob/main/ts
[debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#debug_sync
[testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/TestQuickJSWASMModule.md

### Debugging

Expand Down Expand Up @@ -544,7 +544,7 @@ thinking comes next. Last updated 2022-03-18.

## Related

- Duktape wrapped in Wasm: https://github.com/maple3142/duktape-eval/blob/master/src/Makefile
- Duktape wrapped in Wasm: https://github.com/maple3142/duktape-eval/blob/main/src/Makefile
- QuickJS wrapped in C++: https://github.com/ftk/quickjspp

## Developing
Expand Down
28 changes: 14 additions & 14 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ main()

[github]: https://github.com/justjake/quickjs-emscripten
[npm]: https://www.npmjs.com/package/quickjs-emscripten
[api]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md
[tests]: https://github.com/justjake/quickjs-emscripten/blob/master/ts/quickjs.test.ts
[api]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md
[tests]: https://github.com/justjake/quickjs-emscripten/blob/main/ts/quickjs.test.ts
[values]: #interfacing-with-the-interpreter
[asyncify]: #asyncify
[functions]: #exposing-apis
Expand All @@ -59,7 +59,7 @@ function to directly access the singleton engine in your synchronous code.

### Safely evaluate Javascript code

See [QuickJS.evalCode](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/quickjs.md#evalcode)
See [QuickJS.evalCode](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/quickjs.md#evalcode)

```typescript
import { getQuickJS, shouldInterruptAfterDeadline } from "quickjs-emscripten"
Expand All @@ -75,7 +75,7 @@ getQuickJS().then((QuickJS) => {

### Interfacing with the interpreter

You can use [QuickJSContext](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/QuickJSContext.md)
You can use [QuickJSContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/QuickJSContext.md)
to build a scripting environment by modifying globals and exposing functions
into the QuickJS interpreter.

Expand All @@ -84,7 +84,7 @@ classes -- and actions from one context won't leak into other contexts or
runtimes (with one exception, see [Asyncify][asyncify]).

Every context is created inside a
[QuickJSRuntime](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/QuickJSRuntime.md).
[QuickJSRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/QuickJSRuntime.md).
A runtime represents a Javascript heap, and you can even share values between
contexts in the same runtime.

Expand Down Expand Up @@ -166,7 +166,7 @@ handle you create:
#### Scope

A
[`Scope`](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/scope.md#class-scope)
[`Scope`](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/scope.md#class-scope)
instance manages a set of disposables and calls their `.dispose()`
method in the reverse order in which they're added to the scope. Here's the
"Interfacing with the interpreter" example re-written using `Scope`:
Expand Down Expand Up @@ -197,7 +197,7 @@ calling `scope.dispose()` yourself.

#### `Lifetime.consume(fn)`

[`Lifetime.consume`](https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/lifetime.md#consume)
[`Lifetime.consume`](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/lifetime.md#consume)
is sugar for the common pattern of using a handle and then
immediately disposing of it. `Lifetime.consume` takes a `map` function that
produces a result of any type. The `map` fuction is called with the handle,
Expand Down Expand Up @@ -355,9 +355,9 @@ To use asyncify features, use the following functions:
WebAssembly module.
- [newQuickJSAsyncWASMModule][]: create an empty WebAssembly module.

[newasyncruntime]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#newasyncruntime
[newasynccontext]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#newasynccontext
[newquickjsasyncwasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#newquickjsasyncwasmmodule
[newasyncruntime]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newasyncruntime
[newasynccontext]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newasynccontext
[newquickjsasyncwasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newquickjsasyncwasmmodule

These functions are asynchronous because they always create a new underlying
WebAssembly module so that each instance can suspend and resume independently,
Expand Down Expand Up @@ -485,9 +485,9 @@ describe("Realistic test with QuickJS RELEASE build", () => {

For more testing examples, please explore the typescript source of [quickjs-emscripten][ts] repository.

[ts]: https://github.com/justjake/quickjs-emscripten/blob/master/ts
[debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/modules.md#debug_sync
[testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/master/doc/classes/TestQuickJSWASMModule.md
[ts]: https://github.com/justjake/quickjs-emscripten/blob/main/ts
[debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#debug_sync
[testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/TestQuickJSWASMModule.md

### Debugging

Expand Down Expand Up @@ -546,7 +546,7 @@ thinking comes next. Last updated 2022-03-18.

## Related

- Duktape wrapped in Wasm: https://github.com/maple3142/duktape-eval/blob/master/src/Makefile
- Duktape wrapped in Wasm: https://github.com/maple3142/duktape-eval/blob/main/src/Makefile
- QuickJS wrapped in C++: https://github.com/ftk/quickjspp

## Developing
Expand Down
22 changes: 11 additions & 11 deletions doc/classes/Lifetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ the creator.

#### Defined in

[ts/lifetime.ts:42](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L42)
[ts/lifetime.ts:42](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L42)

## Properties

Expand All @@ -97,7 +97,7 @@ the creator.

#### Defined in

[ts/lifetime.ts:31](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L31)
[ts/lifetime.ts:31](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L31)

___

Expand All @@ -107,7 +107,7 @@ ___

#### Defined in

[ts/lifetime.ts:32](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L32)
[ts/lifetime.ts:32](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L32)

___

Expand Down Expand Up @@ -177,7 +177,7 @@ ___

#### Defined in

[ts/lifetime.ts:49](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L49)
[ts/lifetime.ts:49](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L49)

___

Expand All @@ -191,7 +191,7 @@ ___

#### Defined in

[ts/lifetime.ts:68](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L68)
[ts/lifetime.ts:68](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L68)

___

Expand All @@ -205,7 +205,7 @@ ___

#### Defined in

[ts/lifetime.ts:64](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L64)
[ts/lifetime.ts:64](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L64)

___

Expand All @@ -224,7 +224,7 @@ may become invalid, leading to memory errors.

#### Defined in

[ts/lifetime.ts:59](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L59)
[ts/lifetime.ts:59](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L59)

## Methods

Expand Down Expand Up @@ -254,7 +254,7 @@ the result of `map(this)`.

#### Defined in

[ts/lifetime.ts:92](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L92)
[ts/lifetime.ts:92](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L92)

**consume**<`O`\>(`map`): `O`

Expand All @@ -276,7 +276,7 @@ the result of `map(this)`.

#### Defined in

[ts/lifetime.ts:95](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L95)
[ts/lifetime.ts:95](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L95)

___

Expand All @@ -296,7 +296,7 @@ Dispose of [value](Lifetime.md#value) and perform cleanup.

#### Defined in

[ts/lifetime.ts:106](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L106)
[ts/lifetime.ts:106](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L106)

___

Expand All @@ -312,4 +312,4 @@ Create a new handle pointing to the same [value](Lifetime.md#value).

#### Defined in

[ts/lifetime.ts:75](https://github.com/justjake/quickjs-emscripten/blob/master/ts/lifetime.ts#L75)
[ts/lifetime.ts:75](https://github.com/justjake/quickjs-emscripten/blob/main/ts/lifetime.ts#L75)
Loading

0 comments on commit 3702dfc

Please sign in to comment.