Skip to content

feat(progress-bar): setup basic #98

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

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4f650bd
feat(progress-bar): setup basic
AugustinMauroy Sep 11, 2024
a3e7623
test: progress-bar
AugustinMauroy Sep 11, 2024
b96cfd0
fix: code style
AugustinMauroy Sep 12, 2024
9180963
fix: code style
AugustinMauroy Sep 12, 2024
3d1760f
fix: code style
AugustinMauroy Sep 12, 2024
5e879ff
fix + update
AugustinMauroy Oct 14, 2024
6297b0d
fix: codespell
AugustinMauroy Oct 14, 2024
9e75a18
wip
AugustinMauroy Oct 22, 2024
2cfc4e1
Merge branch 'main' into feat(progress-bar)
AugustinMauroy Oct 22, 2024
4701dcb
remove
AugustinMauroy Oct 22, 2024
2dbc286
add withe-spaces
AugustinMauroy Nov 18, 2024
aa799c5
remove useless await
AugustinMauroy Nov 18, 2024
62f3486
WIP(spinner)
AugustinMauroy Dec 22, 2024
076815d
use clack
AugustinMauroy Dec 22, 2024
c64aa3e
Merge branch 'main' into feat(progress-bar)
AugustinMauroy Jan 19, 2025
5c5884c
hotfix: type and build fixes (#177)
ovflowd Jan 20, 2025
8ec63c9
refactor(addon-verify): some improvements (#175)
araujogui Jan 20, 2025
cfee887
hotfix: correctly use dedent
ovflowd Jan 20, 2025
1da598d
doc: improve accessibility of expandable lists
aduh95 Jan 26, 2025
a4ea425
doc: add "Skip to content" button
aduh95 Jan 26, 2025
cb66e80
doc: fix styles of the expandable TOC
aduh95 Jan 26, 2025
6c234f6
meta: bump actions/upload-artifact from 4.5.0 to 4.6.0 (#189)
dependabot[bot] Feb 2, 2025
bf1fe58
meta: bump actions/setup-node from 4.1.0 to 4.2.0 (#188)
dependabot[bot] Feb 2, 2025
ef6f16f
meta: bump step-security/harden-runner from 2.10.2 to 2.10.4 (#187)
dependabot[bot] Feb 2, 2025
4019ac0
meta: bump github/codeql-action from 3.28.0 to 3.28.8 (#186)
dependabot[bot] Feb 2, 2025
9091505
meta: bump lint-staged from 15.3.0 to 15.4.3 (#185)
dependabot[bot] Feb 2, 2025
5321cb9
meta: bump glob from 11.0.0 to 11.0.1 (#184)
dependabot[bot] Feb 2, 2025
5751332
meta: bump semver from 7.6.3 to 7.7.0 (#183)
dependabot[bot] Feb 2, 2025
92b7f03
meta: bump commander from 13.0.0 to 13.1.0 (#182)
dependabot[bot] Feb 2, 2025
8e3d276
meta: bump @types/node from 22.10.3 to 22.13.0 (#180)
dependabot[bot] Feb 2, 2025
653672e
meta: bump shiki from 1.24.4 to 2.2.0 (#181)
dependabot[bot] Feb 2, 2025
1c86005
meta: bump the lint group with 4 updates (#179)
dependabot[bot] Feb 2, 2025
3452cf2
doc: make MDN links to global classes more consistent (#190)
aduh95 Feb 7, 2025
11a7953
feat apilinks.json generator (#153)
flakey5 Feb 11, 2025
20d1cac
meta: bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#202)
dependabot[bot] Mar 1, 2025
9a3c811
meta: bump step-security/harden-runner from 2.10.4 to 2.11.0 (#201)
dependabot[bot] Mar 1, 2025
546f284
meta: bump actions/upload-artifact from 4.6.0 to 4.6.1 (#200)
dependabot[bot] Mar 1, 2025
1206535
meta: bump github/codeql-action from 3.28.8 to 3.28.10 (#199)
dependabot[bot] Mar 1, 2025
c6c1408
meta: bump hastscript from 9.0.0 to 9.0.1 (#198)
dependabot[bot] Mar 1, 2025
0a05afb
meta: bump semver from 7.7.0 to 7.7.1 (#197)
dependabot[bot] Mar 1, 2025
d162314
meta: bump remark-gfm from 4.0.0 to 4.0.1 (#195)
dependabot[bot] Mar 1, 2025
d896c77
meta: bump @types/node from 22.13.0 to 22.13.8 (#194)
dependabot[bot] Mar 1, 2025
588d8f2
meta: bump the lint group with 4 updates (#193)
dependabot[bot] Mar 1, 2025
c26adb4
meta: bump prettier from 3.4.2 to 3.5.2 in the fromat group (#192)
dependabot[bot] Mar 1, 2025
adefb11
workflow(pr): improve (#203)
AugustinMauroy Mar 2, 2025
4eb8286
feat(progress-bar): setup basic
AugustinMauroy Sep 11, 2024
984022e
test: progress-bar
AugustinMauroy Sep 11, 2024
766bae6
fix: code style
AugustinMauroy Sep 12, 2024
5479cab
fix: code style
AugustinMauroy Sep 12, 2024
2769920
fix: code style
AugustinMauroy Sep 12, 2024
6b1308d
fix + update
AugustinMauroy Oct 14, 2024
47c2765
fix: codespell
AugustinMauroy Oct 14, 2024
3a00ed5
wip
AugustinMauroy Oct 22, 2024
0c22339
remove
AugustinMauroy Oct 22, 2024
89228fd
add withe-spaces
AugustinMauroy Nov 18, 2024
f311669
remove useless await
AugustinMauroy Nov 18, 2024
9124051
WIP(spinner)
AugustinMauroy Dec 22, 2024
89e377e
use clack
AugustinMauroy Dec 22, 2024
b45d230
Merge branch 'feat(progress-bar)' of https://github.com/nodejs/api-do…
AugustinMauroy Mar 4, 2025
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
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

Expand All @@ -49,7 +49,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/autobuild@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -72,6 +72,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
category: '/language:${{matrix.language}}'
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint
run: node --run lint

- name: Format
run: npm run format
- name: Test
run: npm test
run: node --run format

- name: Test with coverage
run: npm run test:coverage
run: node --run test:coverage
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit

Expand All @@ -42,7 +42,7 @@ jobs:
persist-credentials: false

- name: Run Scorecard Analysis
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -51,14 +51,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: Upload Artifacts
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: Upload Scan Results
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
with:
sarif_file: results.sarif
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Commonly ignored Node.js files
# Vendor Folders
node_modules
npm-debug.log
.npm
.env.*

# Default Output Directory
out
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ Options:
-o, --output <path> Specify the relative or absolute output directory
-v, --version <semver> Specify the target version of Node.js, semver compliant (default: "v22.6.0")
-c, --changelog <url> Specify the path (file: or https://) to the CHANGELOG.md file (default: "https://raw.githubusercontent.com/nodejs/node/HEAD/CHANGELOG.md")
-t, --target [mode...] Set the processing target modes (choices: "json-simple", "legacy-html", "legacy-html-all", "man-page", "legacy-json", "legacy-json-all", "addon-verify")
-t, --target [mode...] Set the processing target modes (choices: "json-simple", "legacy-html", "legacy-html-all", "man-page", "legacy-json", "legacy-json-all", "addon-verify", "api-links")
-h, --help display help for command
```
10 changes: 6 additions & 4 deletions bin/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { coerce } from 'semver';
import { DOC_NODE_CHANGELOG_URL, DOC_NODE_VERSION } from '../src/constants.mjs';
import createGenerator from '../src/generators.mjs';
import generators from '../src/generators/index.mjs';
import createLoader from '../src/loader.mjs';
import createParser from '../src/parser.mjs';
import createMarkdownLoader from '../src/loaders/markdown.mjs';
import createMarkdownParser from '../src/parsers/markdown.mjs';
import createNodeReleases from '../src/releases.mjs';

const availableGenerators = Object.keys(generators);
Expand Down Expand Up @@ -68,8 +68,8 @@ program
*/
const { input, output, target = [], version, changelog } = program.opts();

const { loadFiles } = createLoader();
const { parseApiDocs } = createParser();
const { loadFiles } = createMarkdownLoader();
const { parseApiDocs } = createMarkdownParser();

const apiDocFiles = loadFiles(input);

Expand All @@ -83,6 +83,8 @@ const { getAllMajors } = createNodeReleases(changelog);
await runGenerators({
// A list of target modes for the API docs parser
generators: target,
// Resolved `input` to be used
input: input,
// Resolved `output` path to be used
output: resolve(output),
// Resolved SemVer of current Node.js version
Expand Down
24 changes: 24 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Spinner } from "./src/utils/spinner.mjs";
import * as prompts from '@clack/prompts';

prompts.intro('spinner start...');

const spinner = new Spinner();
spinner.total = 100;

spinner.start();

new Promise((resolve) => {
let progress = 0;
const timer = setInterval(() => {
progress = Math.min(spinner.total, progress + 1);
spinner.update(1, `Loading... ${progress}/${spinner.total}`);
if (progress >= spinner.total) {
clearInterval(timer);
resolve(true);
}
}, 100);
}).then(() => {
spinner.stop('Done');
prompts.outro('spinner stop...');
});
Loading
Loading