Add Babel 8 preset smoke#1214
Conversation
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughAdds an opt-in Babel 8 smoke test that builds a sample bundle through Shakapacker’s preset, and wires a new CI job to run it. The workflow also includes a curl handling refactor and a d.ts glob path correction. ChangesBabel 8 smoke test and CI wiring
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CI as GitHub Actions
participant Jest as babel8-smoke.test.js
participant npm as npm
participant Webpack as webpack
participant Preset as Shakapacker Babel preset
CI->>Jest: run with RUN_BABEL8_SMOKE=1
Jest->>npm: install Babel 8 and babel-loader packages
Jest->>Webpack: build sample entry
Webpack->>Preset: resolve and apply preset
Preset-->>Webpack: transformed code
Webpack-->>Jest: bundle output
Jest-->>CI: pass/fail result
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds a Babel 8 smoke path without changing the normal Babel 7 development pins. The main changes are:
Confidence Score: 5/5The changed flow looks mergeable after a small cleanup to the smoke test shutdown path.
test/package/babel8-smoke.test.js Important Files Changed
Reviews (1): Last reviewed commit: "Add Babel 8 preset smoke" | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 712cbc7b9f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
712cbc7 to
a0c2272
Compare
Review summaryReviewed the workflow change and the new Main finding (inline comment on the test file): The temp app's Babel 8 packages are installed into Smaller/non-blocking notes:
Workflow fixes ( |
a0c2272 to
e90f8db
Compare
|
Address-review follow-up summary:
Focused verification after the latest patch:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e90f8db20b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e90f8db to
d995fbc
Compare
Review summaryReviewed the actionlint fixes and the new Babel 8 smoke test/job. Two inline comments posted with details:
Other things checked and looking good:
|
d995fbc to
14a10f7
Compare
14a10f7 to
0007880
Compare
Review summaryOverall this is a clean, well-isolated addition: the Babel 8 smoke test is opt-in ( One organizational note (left as an inline comment): the new test lives in No security or correctness issues found — the smoke test only shells out to fixed, hardcoded package specs (no user-controlled input reaches |
|
CI follow-up: the hosted Babel 8 smoke failed twice on the dedicated Node 24 runner with a Webpack parser error ( |
0007880 to
a545303
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/node.yml (1)
171-196: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winConsider adding an explicit
permissions:block to the new job.Static analysis flags the file for relying on default (broad)
GITHUB_TOKENpermissions. The newbabel8-smokejob only checks out code, installs deps, builds, and runs Jest — it needs no write access. Since this job doesn't usesecrets.GITHUB_TOKENfor anything, scoping it to read-only (orpermissions: {}) reduces blast radius if a compromised dependency runs duringnpm install/yarn build/Jest.🔒 Suggested addition
babel8-smoke: name: Babel 8 smoke runs-on: ubuntu-latest + permissions: + contents: readThis mirrors a pre-existing gap already flagged by zizmor on the
type-check-dts-without-webpackjob (Lines 111-143), which also has nopermissions:block.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/node.yml around lines 171 - 196, The new babel8-smoke job is relying on the default broad GITHUB_TOKEN scope. Add an explicit permissions block to this job in the node workflow so it runs with read-only access or no token permissions at all, since it only uses actions/checkout, setup-node, yarn install/build, and the Jest smoke test. Keep the change localized to the babel8-smoke job so the workflow’s other jobs are unaffected.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/node.yml:
- Around line 171-196: The new babel8-smoke job is relying on the default broad
GITHUB_TOKEN scope. Add an explicit permissions block to this job in the node
workflow so it runs with read-only access or no token permissions at all, since
it only uses actions/checkout, setup-node, yarn install/build, and the Jest
smoke test. Keep the change localized to the babel8-smoke job so the workflow’s
other jobs are unaffected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c34f4eac-d3c2-4ec4-9c84-0dfcdecd7163
📒 Files selected for processing (2)
.github/workflows/node.ymltest/package/babel8-smoke.test.js
Review summaryOverall this is a well-scoped, self-contained addition: an opt-in Babel 8 smoke test that installs Babel 8 + babel-loader 10 into a temp npm project and compiles a fixture through Shakapacker's built Babel preset, plus a dedicated CI job for it. I traced the preset's dependency chain ( Left two inline notes:
No security concerns — the installed package list is a fixed, hardcoded array (no interpolation of untrusted input into |
Review summaryOverall this is a well-built, well-tested addition — the Left two inline notes worth considering before merge:
No security issues found (no secrets touched, |
a545303 to
e3ca204
Compare
|
CI follow-up: the hosted smoke failure remained runner-only after moving to Node 22, still at Webpack parsing transformed output. I simplified the fixture source to avoid syntax transforms and keep this smoke focused on the target contract: Babel 8 packages are installed at exact versions, the built Shakapacker preset is loaded from a temp consumer |
e3ca204 to
fc8f548
Compare
Review summaryOverall this is a well-scoped, opt-in smoke test (mirrors the existing Left one inline comment on
Minor/non-blocking notes (not filed inline):
|
Review: Add Babel 8 preset smokeReviewed the diff via Summary
What's good
Suggestions (non-blocking)
Nothing here blocks merging — the core coverage gap being closed (real compile through Babel 8 + babel-loader 10 with the built preset) looks well-targeted and matches the PR description and issue #1191. |
fc8f548 to
5e73fb6
Compare
|
CI follow-up: the hosted failure was Jest parsing Babel 8 ESM while Webpack/babel-loader ran inside the Jest runtime. The smoke now keeps the Webpack + babel-loader coverage, but writes and runs a small child-process Node script from the temp app. That runs outside Jest’s CommonJS module wrapper, still uses the temp consumer |
5e73fb6 to
976c4f6
Compare
ReviewWent through all three changed files ( Things I verified and are correct:
One minor nit left as an inline comment: Low-severity observation (not requesting a change, just flagging): the dedicated No security or correctness issues found in the new workflow YAML ( |
Review: Add Babel 8 preset smokeOverviewAdds an opt-in Babel 8 compatibility smoke test ( This closes #1191 and builds on the Babel 8 preset support already merged in #1187 — this PR is pure test/CI infrastructure, so per project convention it correctly carries no CHANGELOG entry. Strengths
Suggestions / things to watch
Risks
Overall this is a well-scoped, low-risk addition that follows existing conventions closely. The suggestions above are minor and non-blocking. |
976c4f6 to
2c9e3cf
Compare
Review: Add Babel 8 preset smokeOverviewAdds an opt-in smoke test ( Code quality
Suggestions
Risks / considerations
Overall this is a well-scoped, low-risk addition that keeps Babel 7 as the default dev pin while giving early signal on Babel 8 compatibility. No blocking issues found. |
Review summaryOverall this is a well-structured, self-contained addition — the opt-in gating ( I verified the core logic being smoke-tested: One coverage gap worth a look — left as an inline comment: the compiled fixture ( No security or performance concerns beyond the expected cost of the new opt-in CI job (which only runs on relevant path changes, as intended). |
Review summaryReviewed the Babel 8 smoke test, the new dedicated workflow, and the incidental Node workflow/actionlint fixes. Overall: this is a low-risk, test/CI-only change that closely follows the existing Things I checked and are fine:
One minor nit left as an inline comment: the No security or performance concerns found; no CHANGELOG entry needed since this is test/CI tooling only, consistent with |
Summary
test/packages/that installs exact Babel 8 plusbabel-loader10 versions into a temp npm appnode_modules/shakapackerlayoutworkflow_dispatch, without changing normal Babel 7 dev pinsCloses #1191
Local validation
yarn install --frozen-lockfile --non-interactive --prefer-offlineyarn buildBABEL_ENV=production RUN_BABEL8_SMOKE=1 node node_modules/jest/bin/jest.js test/packages/babel8-smoke.test.js --runInBand --no-cachenode node_modules/eslint/bin/eslint.js test/packages/babel8-smoke.test.jsnode node_modules/prettier/bin/prettier.cjs --check .github/workflows/babel8-smoke.yml .github/workflows/node.yml test/packages/babel8-smoke.test.jsactionlint .github/workflows/babel8-smoke.yml .github/workflows/node.ymlgit diff --check origin/main...HEAD