-
Notifications
You must be signed in to change notification settings - Fork 129
[2.4.0 stack 1/7] Tooling: vp pack, npm, release-please, tree-shaking CI diff, runtime shims #507
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
Open
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
55499e1
chore: tidy gitignore, pin Node version and contributors file
hyanmandian 867cd00
build: migrate the build toolchain to vp pack with per-util subpath e…
hyanmandian 6a214cc
test: update Bun/Deno runtime shims
hyanmandian 1310d1c
chore(deps): switch to npm and bump the toolchain
hyanmandian 07c1b85
ci: migrate release automation to release-please
hyanmandian dd36ee4
ci(tree-shaking): compare per-export bundle sizes against the base br…
hyanmandian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Setup | ||
| description: Set up Vite+ (and optionally Node.js) for CI jobs. Does not check out the repository. | ||
|
|
||
| inputs: | ||
| node-version: | ||
| description: Node.js version to install via actions/setup-node. Reads .nvmrc when omitted. | ||
| required: false | ||
| default: "" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: ${{ inputs.node-version }} | ||
| node-version-file: ${{ inputs.node-version == '' && '.nvmrc' || '' }} | ||
|
|
||
| - name: Setup Vite+ | ||
| uses: voidzero-dev/setup-vp@v1.19.0 | ||
| with: | ||
| cache: true | ||
| node-manager: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Update datasets | ||
|
|
||
| on: | ||
| schedule: | ||
| # Every Monday at 09:00 America/Sao_Paulo (12:00 UTC), same day as Dependabot. | ||
| - cron: "0 12 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| update-datasets: | ||
| name: Update IBGE/CONCLA datasets | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Rebuild datasets | ||
| run: npm run build:data | ||
|
|
||
| - name: Check for changes | ||
| id: diff | ||
| run: | | ||
| if git diff --quiet; then | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Open pull request | ||
| if: steps.diff.outputs.changed == 'true' | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| commit-message: "chore(data): update IBGE/CONCLA datasets" | ||
| branch: chore/update-datasets | ||
| title: "chore(data): update IBGE/CONCLA datasets" | ||
| body: | | ||
| Automated weekly refresh of the cities, states and legal-natures | ||
| datasets sourced from IBGE/CONCLA. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Live tests | ||
|
|
||
| on: | ||
| schedule: | ||
| # Every Monday at 09:00 America/Sao_Paulo (12:00 UTC), same day as Dependabot. | ||
| - cron: "0 12 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| live-cep: | ||
| name: Live CEP provider tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup | ||
| uses: ./.github/actions/setup | ||
|
|
||
| - name: Run live CEP tests | ||
| run: vp run test:live | ||
| continue-on-error: false |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: brazilian-utils/javascript
Length of output: 18451
🏁 Script executed:
Repository: brazilian-utils/javascript
Length of output: 8190
🏁 Script executed:
Repository: brazilian-utils/javascript
Length of output: 9376
🌐 Web query:
voidzero-dev/setup-vp@v1.19.0 GitHub documentation Node.js setup behavior💡 Result:
The voidzero-dev/setup-vp GitHub Action manages Node.js installation as part of its setup process for Vite+ (vp) [1][2]. In version 1.19.0 (as with other versions in the v1.x series), the Action provides automated control over the Node.js environment on the runner [3][4]. Key behaviors regarding Node.js setup include: - Managed Installation via vp env: The Action uses the
vp env usecommand to install and set up the required Node.js version [3][4]. - Input Configuration: - node-version: You can explicitly specify the Node.js version (e.g., "24"). If omitted, it defaults to the latest LTS release [3][4]. - node-version-file: You can point the action to a file—such as.nvmrc,.node-version,.tool-versions, or package.json—to determine the required version [3][4]. - Node Manager Control: The node-manager input allows you to control how Vite+ manages Node.js. When left unset, the installer enables managed Node.js by default on CI environments [4]. If you set node-manager to false, the Action skips shim creation and prefers the Node.js already present on the runner (e.g., from an earlier actions/setup-node step or the runner image itself) [4]. - Integration: Because setup-vp handles Node.js installation, dependency management, and caching, you typically do not need to include separate setup-node steps in your GitHub Actions workflow [2]. Note: It is recommended to use an exact version tag (e.g.,@v1.19.0) rather than a moving tag like@v1, as the v1 major tag is frozen at v1.15.0 and will not receive updates [1][5][6].Citations:
🌐 Web query:
site:github.com/voidzero-dev/setup-vp/blob/v1.19.0/action.yml node-version-file node-manager💡 Result:
In
voidzero-dev/setup-vp@v1.19.0:node-version-file: accepts.nvmrc,.node-version,.tool-versions, orpackage.json; ignored ifnode-versionis set.node-manager: controls Vite+’s Node.js manager:false: use the runner’s existing Node.jstrue: force managed Node.jsfalsecannot be combined withnode-versionornode-version-file[1][1] (raw.githubusercontent.com)
Citations:
Pass the Node.js version to
setup-vp.voidzero-dev/setup-vp@v1.19.0manages Node.js afteractions/setup-node@v7. Whennode-versionis empty,setup-vpuses its default instead of reading.nvmrc. It can also replace a matrix version selected by the earlier step.Proposed fix
🤖 Prompt for AI Agents