Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

fix(api): fixed api generation issues and improved transformer #2758

Merged
merged 12 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/generate-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
runs-on: ubuntu-latest
if: github.event.label.name == 'create-preview'
steps:

- name: Git Checkout
uses: actions/checkout@v3
with:
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,44 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
ref: main
- name: Git Checkout
uses: actions/checkout@v3
with:
ref: main

- name: Setup Pages
uses: actions/configure-pages@v2
- name: Setup Pages
uses: actions/configure-pages@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install NPM packages
run: npm ci
- name: Install NPM packages
run: npm ci

- name: Gatsby Cache Folder
uses: actions/cache@v3
with:
key: gatsby-cache-folder
path: .cache
- name: Gatsby Cache Folder
uses: actions/cache@v3
with:
key: cache-folder
path: .cache

- name: Gatsby Public Folder
uses: actions/cache@v3
with:
key: gatsby-public-folder
path: public
- name: Gatsby Public Folder
uses: actions/cache@v3
with:
key: public-folder
path: public

- name: Build Gatsby
run: npm run build-ci
env:
PATH_PREFIX: nodejs.dev/
- name: Build Gatsby
run: npm run build-ci
env:
PATH_PREFIX: nodejs.dev/

- name: Upload Website to Pages
uses: actions/upload-pages-artifact@v1
with:
path: './public'
- name: Upload Website to Pages
uses: actions/upload-pages-artifact@v1
with:
path: './public'

deploy:
permissions:
Expand All @@ -64,6 +64,6 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
12 changes: 12 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,17 @@ jobs:
- name: Install NPM packages
run: npm ci

- name: Gatsby Cache Folder
uses: actions/cache@v3
with:
key: cache-folder
path: .cache

- name: Gatsby Public Folder
uses: actions/cache@v3
with:
key: public-folder
path: public

- name: Build Gatsby
run: npm run build-ci
14 changes: 7 additions & 7 deletions content/api/v18/assert.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ An alias of [`assert.deepStrictEqual()`][].

**Legacy assertion mode**

<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use [`assert.deepStrictEqual()`][] instead."}}} />
<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use `assert.deepStrictEqual()` instead."}}} />

Tests for deep equality between the `actual` and `expected` parameters. Consider
using [`assert.deepStrictEqual()`][] instead. [`assert.deepEqual()`][] can have
Expand Down Expand Up @@ -1091,7 +1091,7 @@ An alias of [`assert.strictEqual()`][].

**Legacy assertion mode**

<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use [`assert.strictEqual()`][] instead."}}} />
<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use `assert.strictEqual()` instead."}}} />

Tests shallow, coercive equality between the `actual` and `expected` parameters
using the [`==` operator][]. `NaN` is specially handled
Expand Down Expand Up @@ -1178,7 +1178,7 @@ See below for further details.

<Metadata version="v18.9.0" data={{"changes":[{"version":"v10.0.0","pr-url":"https://github.com/nodejs/node/pull/18418","description":"Calling `assert.fail()` with more than one argument is deprecated and emits a warning."}],"update":{"type":"added","version":["v0.1.21"]}}} />

<Metadata version="v18.9.0" data={{"stability":{"level":0,"text":" - Deprecated: Use `assert.fail([message])` or other assert\n> functions instead."}}} />
<Metadata version="v18.9.0" data={{"stability":{"level":0,"text":" - Deprecated: Use `assert.fail([message])` or other assert functions instead."}}} />

* `actual` [`any`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types)
* `expected` [`any`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types)
Expand Down Expand Up @@ -1384,7 +1384,7 @@ An alias of [`assert.notDeepStrictEqual()`][].

**Legacy assertion mode**

<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use [`assert.notDeepStrictEqual()`][] instead."}}} />
<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use `assert.notDeepStrictEqual()` instead."}}} />

Tests for any deep inequality. Opposite of [`assert.deepEqual()`][].

Expand Down Expand Up @@ -1504,7 +1504,7 @@ An alias of [`assert.notStrictEqual()`][].

**Legacy assertion mode**

<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use [`assert.notStrictEqual()`][] instead."}}} />
<Metadata version="v18.9.0" data={{"stability":{"level":3,"text":" - Legacy: Use `assert.notStrictEqual()` instead."}}} />

Tests shallow, coercive inequality with the [`!=` operator][]. `NaN` is
specially handled and treated as being identical if both sides are `NaN`.
Expand Down Expand Up @@ -1890,7 +1890,7 @@ assert.strictEqual('Hello foobar', 'Hello World!');

const apples = 1;
const oranges = 2;
assert.strictEqual(apples, oranges, `apples $apples !== oranges $oranges`);
assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2

assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
Expand Down Expand Up @@ -1918,7 +1918,7 @@ assert.strictEqual('Hello foobar', 'Hello World!');

const apples = 1;
const oranges = 2;
assert.strictEqual(apples, oranges, `apples $apples !== oranges $oranges`);
assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2

assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
Expand Down
14 changes: 7 additions & 7 deletions content/api/v18/async_hooks.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ createHook({
const eid = executionAsyncId();
fs.writeSync(
stdout.fd,
`$type($asyncId): trigger: $triggerAsyncId execution: $eid\n`);
`${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`);
}
}).enable();

Expand All @@ -390,7 +390,7 @@ createHook({
const eid = executionAsyncId();
fs.writeSync(
stdout.fd,
`$type($asyncId): trigger: $triggerAsyncId execution: $eid\n`);
`${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`);
}
}).enable();

Expand Down Expand Up @@ -448,22 +448,22 @@ async_hooks.createHook({
const indentStr = ' '.repeat(indent);
fs.writeSync(
fd,
`$indentStr$type($asyncId):` +
` trigger: $triggerAsyncId execution: $eid\n`);
`${indentStr}${type}(${asyncId}):` +
` trigger: ${triggerAsyncId} execution: ${eid}\n`);
},
before(asyncId) {
const indentStr = ' '.repeat(indent);
fs.writeSync(fd, `$indentStrbefore: $asyncId\n`);
fs.writeSync(fd, `${indentStr}before: ${asyncId}\n`);
indent += 2;
},
after(asyncId) {
indent -= 2;
const indentStr = ' '.repeat(indent);
fs.writeSync(fd, `$indentStrafter: $asyncId\n`);
fs.writeSync(fd, `${indentStr}after: ${asyncId}\n`);
},
destroy(asyncId) {
const indentStr = ' '.repeat(indent);
fs.writeSync(fd, `$indentStrdestroy: $asyncId\n`);
fs.writeSync(fd, `${indentStr}destroy: ${asyncId}\n`);
},
}).enable();

Expand Down
Loading