Remove package-lock.json and gitignore non-yarn lock files#2140
Open
trillium wants to merge 11 commits intodevelopmentfrom
Open
Remove package-lock.json and gitignore non-yarn lock files#2140trillium wants to merge 11 commits intodevelopmentfrom
trillium wants to merge 11 commits intodevelopmentfrom
Conversation
…tle caching, and commit tracking - Python skill (verify_stale_issue.py) with issue type detection - Bash implementations for single and batch issue verification - Label-based scope detection (dev vs non-dev roles) - Title consistency caching system - Git commit history analysis for PR tracking - Decision tree logic for issue verdict categorization
Convert all require() calls for third-party npm packages (express, mongoose, jsonwebtoken, etc.) to ESM import syntax as the first step of the CJS-to-ESM migration.
…ensions Convert all require() calls for relative paths (./x, ../x) to ESM import syntax, adding explicit .js file extensions as required by the ESM module resolution algorithm.
Replace all module.exports assignments with ESM export syntax. Barrel files (models/index.js, controllers/index.js, middleware/index.js, validators/index.js) use named exports; individual modules use export default.
…check Convert the CJS entry-point guard pattern to its ESM equivalent using fileURLToPath(import.meta.url), which is needed because ESM has no require.main.
…configs to .cjs Flip the ESM switch by adding "type": "module" to backend/package.json. Rename jest.config.js and jest-mongodb-config.js to .cjs since Jest config files must remain CommonJS until the Vitest migration.
Replace Jest with Vitest: add vitest.config.js with node environment and 30s timeout, update package.json scripts (test -> vitest run, test:watch -> vitest), convert jest.setup.js to use vi.mock, and remove jest/jest-mongodb config files and dependencies.
… test files Replace all Jest test APIs with their Vitest equivalents (jest.mock -> vi.mock, jest.fn -> vi.fn) and add explicit vitest imports (describe, it, expect, vi, etc.) to every test file.
…-test.js Vitest does not support the done() callback pattern; remove done parameter and done() calls from all test functions, using async/await instead. Add vitest lifecycle imports (beforeAll, afterEach, afterAll) to setup-test.js.
3 tasks
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
backend/package-lock.jsonthat was introduced by the ESM migration in Migrate backend from CommonJS to ES Modules #2134package-lock.jsonandpnpm-lock.yamlto.gitignoresince this project uses YarnFixes #2141
Dependencies
This PR is based on
chore/backend-esm-migration(#2134) and should be merged after #2134 lands ondevelopment.Test plan
backend/package-lock.jsonis no longer tracked.gitignoreincludespackage-lock.jsonandpnpm-lock.yamlyarn.lockis still tracked and unaffected