Skip to content

refactor(V2): convert modeltypes files from cjs to esm#1561

Merged
TheLastCicada merged 2 commits into
v2-rc2from
chore/tier2-tier3-dep-updates-phase4
Mar 31, 2026
Merged

refactor(V2): convert modeltypes files from cjs to esm#1561
TheLastCicada merged 2 commits into
v2-rc2from
chore/tier2-tier3-dep-updates-phase4

Conversation

@TheLastCicada

@TheLastCicada TheLastCicada commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • convert all src/models/**/*.modeltypes.cjs files to ESM *.modeltypes.js
  • update all consuming model imports to reference .modeltypes.js
  • remove cjs from package.json extensionless.lookFor

Test plan

  • eval "$(fnm env)" && fnm use && npm run build
  • eval "$(fnm env)" && fnm use && npm run test:v1
  • eval "$(fnm env)" && fnm use && npm run test:v2

Note

Medium Risk
Medium risk because it changes module format and import paths across many Sequelize models; any missed default/named export mismatch or loader behavior change could break model initialization at runtime.

Overview
Converts Sequelize *.modeltypes definitions from CommonJS to ESM across both v1 and v2 models, updating all consuming models/mirror models to import *.modeltypes.js (with export default), and adjusting a few v2 type modules to default-export their type maps.

Updates runtime packaging settings by dropping cjs from extensionless.lookFor and bumping uuid from ^10 to ^13 (lockfile updated accordingly).

Written by Cursor Bugbot for commit d594c0d. This will update automatically on new commits. Configure here.

Rename all src/models modeltypes modules from .cjs to .js, convert
CommonJS exports to ESM defaults, and update all consuming model imports.
This unblocks the planned uuid v13 upgrade by removing CJS-only usage.
Move uuid from v10 to v13 now that modeltypes modules are ESM-only.
This keeps dependencies current while preserving existing runtime behavior.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updateduuid@​10.0.0 ⏵ 13.0.010010010083100

View full report

@TheLastCicada TheLastCicada merged commit 608a2cd into v2-rc2 Mar 31, 2026
25 checks passed
@TheLastCicada TheLastCicada deleted the chore/tier2-tier3-dep-updates-phase4 branch March 31, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant