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

Commit 2a0d78a

Browse files
authored
fix(api): fixed api generation issues and improved transformer (#2758)
1 parent cf17f7e commit 2a0d78a

71 files changed

Lines changed: 1301 additions & 1316 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/generate-preview.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414
if: github.event.label.name == 'create-preview'
1515
steps:
16-
1716
- name: Git Checkout
1817
uses: actions/checkout@v3
1918
with:

.github/workflows/github-pages.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,44 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- name: Git Checkout
19-
uses: actions/checkout@v3
20-
with:
21-
ref: main
18+
- name: Git Checkout
19+
uses: actions/checkout@v3
20+
with:
21+
ref: main
2222

23-
- name: Setup Pages
24-
uses: actions/configure-pages@v2
23+
- name: Setup Pages
24+
uses: actions/configure-pages@v2
2525

26-
- name: Setup Node.js
27-
uses: actions/setup-node@v3
28-
with:
29-
node-version-file: '.nvmrc'
30-
cache: 'npm'
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version-file: '.nvmrc'
30+
cache: 'npm'
3131

32-
- name: Install NPM packages
33-
run: npm ci
32+
- name: Install NPM packages
33+
run: npm ci
3434

35-
- name: Gatsby Cache Folder
36-
uses: actions/cache@v3
37-
with:
38-
key: gatsby-cache-folder
39-
path: .cache
35+
- name: Gatsby Cache Folder
36+
uses: actions/cache@v3
37+
with:
38+
key: cache-folder
39+
path: .cache
4040

41-
- name: Gatsby Public Folder
42-
uses: actions/cache@v3
43-
with:
44-
key: gatsby-public-folder
45-
path: public
41+
- name: Gatsby Public Folder
42+
uses: actions/cache@v3
43+
with:
44+
key: public-folder
45+
path: public
4646

47-
- name: Build Gatsby
48-
run: npm run build-ci
49-
env:
50-
PATH_PREFIX: nodejs.dev/
47+
- name: Build Gatsby
48+
run: npm run build-ci
49+
env:
50+
PATH_PREFIX: nodejs.dev/
5151

52-
- name: Upload Website to Pages
53-
uses: actions/upload-pages-artifact@v1
54-
with:
55-
path: './public'
52+
- name: Upload Website to Pages
53+
uses: actions/upload-pages-artifact@v1
54+
with:
55+
path: './public'
5656

5757
deploy:
5858
permissions:
@@ -64,6 +64,6 @@ jobs:
6464
runs-on: ubuntu-latest
6565
needs: build-and-deploy
6666
steps:
67-
- name: Deploy to GitHub Pages
68-
id: deployment
69-
uses: actions/deploy-pages@v1
67+
- name: Deploy to GitHub Pages
68+
id: deployment
69+
uses: actions/deploy-pages@v1

.github/workflows/pull-request.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,17 @@ jobs:
4747
- name: Install NPM packages
4848
run: npm ci
4949

50+
- name: Gatsby Cache Folder
51+
uses: actions/cache@v3
52+
with:
53+
key: cache-folder
54+
path: .cache
55+
56+
- name: Gatsby Public Folder
57+
uses: actions/cache@v3
58+
with:
59+
key: public-folder
60+
path: public
61+
5062
- name: Build Gatsby
5163
run: npm run build-ci

content/api/v18/assert.en.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ An alias of [`assert.deepStrictEqual()`][].
509509

510510
**Legacy assertion mode**
511511

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

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

10921092
**Legacy assertion mode**
10931093

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

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

11791179
<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"]}}} />
11801180

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

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

13851385
**Legacy assertion mode**
13861386

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

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

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

15051505
**Legacy assertion mode**
15061506

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

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

18911891
const apples = 1;
18921892
const oranges = 2;
1893-
assert.strictEqual(apples, oranges, `apples $apples !== oranges $oranges`);
1893+
assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
18941894
// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
18951895

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

19191919
const apples = 1;
19201920
const oranges = 2;
1921-
assert.strictEqual(apples, oranges, `apples $apples !== oranges $oranges`);
1921+
assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
19221922
// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
19231923

19241924
assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));

content/api/v18/async_hooks.en.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ createHook({
373373
const eid = executionAsyncId();
374374
fs.writeSync(
375375
stdout.fd,
376-
`$type($asyncId): trigger: $triggerAsyncId execution: $eid\n`);
376+
`${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`);
377377
}
378378
}).enable();
379379

@@ -390,7 +390,7 @@ createHook({
390390
const eid = executionAsyncId();
391391
fs.writeSync(
392392
stdout.fd,
393-
`$type($asyncId): trigger: $triggerAsyncId execution: $eid\n`);
393+
`${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`);
394394
}
395395
}).enable();
396396

@@ -448,22 +448,22 @@ async_hooks.createHook({
448448
const indentStr = ' '.repeat(indent);
449449
fs.writeSync(
450450
fd,
451-
`$indentStr$type($asyncId):` +
452-
` trigger: $triggerAsyncId execution: $eid\n`);
451+
`${indentStr}${type}(${asyncId}):` +
452+
` trigger: ${triggerAsyncId} execution: ${eid}\n`);
453453
},
454454
before(asyncId) {
455455
const indentStr = ' '.repeat(indent);
456-
fs.writeSync(fd, `$indentStrbefore: $asyncId\n`);
456+
fs.writeSync(fd, `${indentStr}before: ${asyncId}\n`);
457457
indent += 2;
458458
},
459459
after(asyncId) {
460460
indent -= 2;
461461
const indentStr = ' '.repeat(indent);
462-
fs.writeSync(fd, `$indentStrafter: $asyncId\n`);
462+
fs.writeSync(fd, `${indentStr}after: ${asyncId}\n`);
463463
},
464464
destroy(asyncId) {
465465
const indentStr = ' '.repeat(indent);
466-
fs.writeSync(fd, `$indentStrdestroy: $asyncId\n`);
466+
fs.writeSync(fd, `${indentStr}destroy: ${asyncId}\n`);
467467
},
468468
}).enable();
469469

0 commit comments

Comments
 (0)