root - chore: upgrade ejs to v6 (breaking)#384
Merged
Conversation
Bump the EJS template engine across a major version. - ejs 5.0.2 -> 6.0.1 ejs 6 is primarily a packaging/security major: - Proper dual ESM/CJS output (separate lib/esm and lib/cjs); the old dual-mode shim that broke ESM-aware bundlers/Bun/Deno is removed. This is strictly better for ecto, which is an ESM package. - New default prototype-pollution mitigation: template identifiers no longer resolve through the locals object's prototype chain unless the new `unsafePrototypeLocals: true` option is set. ecto's EJS engine uses the stable ejs.render(source, data, opts) API, which is unchanged. pnpm build and all 239 tests pass with 100% coverage, no code changes required. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013MMsnH2H2ghs6xLGibb5v2
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #384 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 409 409
Branches 96 96
=========================================
Hits 409 409 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Upgrade the EJS template engine across a major version. First runtime-phase PR.
Versions
ejs5.0.2→6.0.1Tests
pnpm buildpassespnpm testpasses (239 tests, 100% coverage) — no code changes requiredBreaking notes
ejs 6 is primarily a packaging + security major; ecto's EJS engine uses the stable
ejs.render(source, data, opts)API, which is unchanged.lib/esmandlib/cjsbuilds. The old dual-mode shim (module.exports = ejsinside the ESM source) that modern ESM bundlers / Bun / Deno treated as malformed has been removed. This is strictly better for ecto, which is an ESM-only package.Object.create(...)locals and rely on inherited top-level properties must now opt in via the newunsafePrototypeLocals: trueoption. ecto's typical plain-object locals are unaffected.Notes
Runtime-phase ordering:
writr6.1.3 (higher priority, patch) is deferred — the repo'strustPolicy: no-downgraderejectswritr@6.1.2/6.1.3(pulled transitively bydocula@2.0.0) because earlier writr versions carried provenance attestation and these don't. Reported separately; not bundled here.🤖 Generated with Claude Code
Generated by Claude Code