Skip to content

Commit 9e43100

Browse files
authored
chore: introduce api-extractor (#6208)
1 parent 5b4cc6d commit 9e43100

32 files changed

+6956
-130
lines changed

.github/workflows/reusable-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,15 @@ jobs:
298298
if: ${{ inputs.test-diff && !inputs.skipable }}
299299
run: pnpm run test:diff
300300

301+
- name: API change check
302+
if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' && !inputs.skipable }}
303+
run: |
304+
echo "===================================="
305+
echo "Note: force build npm packages with \`pnpm build:js\` and \`pnpm api-extractor:local\` locally to generate API change if \`api-extractor\` check failed."
306+
echo "$ pnpm build:js && pnpm api-extractor:local"
307+
echo "===================================="
308+
pnpm api-extractor:ci
309+
301310
### write the latest metric into branch gh-pages
302311
### Note that, We can't merge this script, because this script only runs on main branch
303312
- name: Update main branch test compatibility metric

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,9 @@ diff_output
231231

232232
# .swc plugins cache
233233
.swc/
234+
235+
# api-extractor temp folder (https://api-extractor.com/pages/configs/api-extractor_json/#apireportreporttempfolder)
236+
/packages/rspack/temp
237+
/packages/rspack-dev-server/temp
238+
/packages/rspack-plugin-react-refresh/temp
239+
/packages/rspack-test-tools/temp

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ packages/rspack/src/config/schema.check.js
99

1010
# Ignore test related
1111

12+
packages/**/etc/**/*
1213
packages/rspack/tests/fixtures/**/*
1314
packages/rspack/tests/statsCases/**/*
1415
packages/rspack/tests/cases/**/*

.vscode/settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"./crates/rspack_plugin_ensure_chunk_conditions/Cargo.toml"
2626
],
2727
"files.associations": {
28-
"*.snap": "markdown"
28+
"*.snap": "markdown",
29+
"*.json": "jsonc"
2930
},
3031
"cSpell.words": [
3132
"contextify",
@@ -41,4 +42,4 @@
4142
"ukey",
4243
"Ukey"
4344
]
44-
}
45+
}

0 commit comments

Comments
 (0)