Skip to content

chore: remove pnpm-lock.yaml to verify unlocked deps#5859

Merged
fengmk2 merged 13 commits intonextfrom
chore-unlock-deps
Apr 7, 2026
Merged

chore: remove pnpm-lock.yaml to verify unlocked deps#5859
fengmk2 merged 13 commits intonextfrom
chore-unlock-deps

Conversation

@elrrrrrrr
Copy link
Copy Markdown
Contributor

@elrrrrrrr elrrrrrrr commented Apr 3, 2026

Summary

Remove pnpm-lock.yaml and use --no-frozen-lockfile so CI resolves the latest dependency versions on every run. Then fix all the breakages this surfaces.

This is intentionally a baseline test for unlocked dependencies — it isolates dependency-upgrade issues from any CI tooling migration.

CI configuration

  • Delete pnpm-lock.yaml
  • Replace pnpm install --frozen-lockfile with pnpm install --no-frozen-lockfile in ci.yml and e2e-test.yml
  • Remove cache: 'pnpm' from setup-node (requires a lockfile)
  • Remove the pnpm dedupe --check step (no lockfile to check against)
  • Add pnpm-lock.yaml to .gitignore

Pre-existing bugs (latent, exposed by upgrades)

These were always wrong but happened to work under specific resolved versions. They are real bugs and should be fixed regardless of locking strategy.

  • tegg/core/vitest/vitest.config.ts — Resolve aliases pointed to non-existent root files (../core-decorator/index.ts, ../common-util/index.ts, ../types/index.ts). The actual entry points live at src/index.ts. Under pnpm symlinks the aliases were never reached, but they fail as soon as the resolver hits them. Fixed all four to point at src/....
  • tegg/plugin/orm/test/index.test.ts — Two describe() blocks were nested inside an it(), so they were silently never executed as test suites. Vitest 4 (already in catalog) actually enforces this and throws. Restructured:
    • Lift appService initialization to outer beforeAll
    • Promote raw query and multi db describes to top level
    • Use beforeEach in raw query (the outer afterEach truncates tables between tests)
    • Skip multi db (the apple/banana databases are empty in prepare.js — separate fix needed)
  • tegg/plugin/tegg/src/types.tsinterface Application inside declare module 'egg' was missing export. Newer oxlint versions correctly flag it as unused. Added export.

Adaptations to upgraded dependencies

These are not bugs in the original code; they adapt to newer versions of upstream packages.

  • tegg/core/common-util/src/StackUtil.ts — The decorator file-path detection skipped frames whose path contained /@oxc-project/runtime/. Newer vite/rolldown produce virtual module ids in the form \x00@oxc-project+runtime@0.122.0/helpers/decorate.js. Added a third match (@oxc-project+runtime@) so the helper frame is skipped in both formats.
  • tegg/core/mcp-client/src/HeaderUtil.tsnew (urllib.Headers)(headersInit) failed to type-check because newer undici types are no longer assignable from the global HeadersInit. Use globalThis.Headers (Node.js 22+ has it natively) and drop the urllib import.
  • tegg/core/loader/test/Loader.test.ts — Newer @oxc-parser reports parse errors as [PARSE_ERROR] Error: Expected \;` but found `Identifier`instead of the olderfailed: Expected …format. Loosened the regex by dropping thefailed: ` literal.
  • tegg/core/ajv-decorator/test/index.test.ts and tegg/core/tegg/test/ajv.test.ts — These tests used toMatchSnapshot() to capture all exports of @sinclair/typebox, which churns on every minor version. Replaced with targeted assertions that only verify egg's own exports (TransformEnum, AjvInvalidParamError) plus a basic typebox re-export check (Type). Deleted the corresponding .snap files.
  • package.json — Added unplugin-unused to root devDependencies. It is a tsdown peerDependency that was only resolved transitively via the lockfile.

Test plan

  • CI is fully green: typecheck, test-bin (ubuntu/windows), test-scripts, all six Test matrix jobs (ubuntu/macos/windows × 22/24)
  • E2E (examples + cnpmcore) green

Remove the lockfile so CI resolves latest dependency versions.
This verifies the project works with unlocked dependencies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 3, 2026 16:02
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

CI workflows loosen pnpm lockfile enforcement and remove pnpm cache flags; a devDependency (unplugin-unused) was added; header construction now uses globalThis.Headers; Application is exported in the Egg module augmentation; several tests switched from snapshot assertions to explicit exported-member checks; .gitignore entry adjusted.

Changes

Cohort / File(s) Summary
CI workflows
\.github/workflows/ci.yml, \.github/workflows/e2e-test.yml
Replaced pnpm install --frozen-lockfile with pnpm install --no-frozen-lockfile in multiple jobs and removed cache: 'pnpm' from actions/setup-node; removed pnpm dedupe --check step from typecheck.
Dev dependencies
package.json
Added unplugin-unused to devDependencies ("unplugin-unused": "catalog:").
Header utility
tegg/core/mcp-client/src/HeaderUtil.ts
Removed explicit Headers import from urllib; create headers using globalThis.Headers(headersInit) instead of new Headers(...).
Type augmentation
tegg/plugin/tegg/src/types.ts
Changed Egg module augmentation to export the Application interface (export interface Application).
Tests
tegg/core/ajv-decorator/test/index.test.ts, tegg/core/tegg/test/ajv.test.ts
Replaced snapshot assertions with targeted runtime checks that specific exported symbols (e.g., TransformEnum, AjvInvalidParamError, Ajv, Type) are defined.
Ignore file
.gitignore
Adjusted ecosystem-ci ignore pattern (replaced ecosystem-ci/examples entry) and added a trailing newline.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I nibble at locks loosened wide,
Headers leap where globals hide.
Types don new exported crest,
Dev tools sift through cupboards pressed.
A hop, a fix — the repo's blessed 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: remove pnpm-lock.yaml to verify unlocked deps' accurately describes a primary change in the PR—removing the lockfile and switching CI to use --no-frozen-lockfile.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore-unlock-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 3, 2026

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 3, 2026

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: c4ae9ea
Status: ✅  Deploy successful!
Preview URL: https://a0f850b1.egg-cci.pages.dev
Branch Preview URL: https://chore-unlock-deps.egg-cci.pages.dev

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the pnpm lockfile and adjusts CI installs to allow resolving the latest dependency versions, to establish a baseline for isolating dependency-upgrade issues.

Changes:

  • Switch GitHub Actions installs from pnpm install --frozen-lockfile to pnpm install --no-frozen-lockfile in CI.
  • Switch GitHub Actions installs from pnpm install --frozen-lockfile to pnpm install --no-frozen-lockfile in E2E CI.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/e2e-test.yml Updates pnpm install command to not require a lockfile.
.github/workflows/ci.yml Updates pnpm install command across CI jobs to not require a lockfile.

Comment thread .github/workflows/ci.yml
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 3, 2026

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: c4ae9ea
Status: ✅  Deploy successful!
Preview URL: https://6e09a3ac.egg-v3.pages.dev
Branch Preview URL: https://chore-unlock-deps.egg-v3.pages.dev

View logs

elrrrrrrr and others added 2 commits April 4, 2026 00:36
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. tegg/plugin/tegg/src/types.ts: export interface Application in
   declare module block (oxlint new version flags unused interfaces)
2. tegg/core/mcp-client/src/HeaderUtil.ts: use globalThis.Headers
   instead of urllib's re-export to avoid HeadersInit type mismatch
   with newer undici types
3. package.json: add unplugin-unused to root devDependencies (tsdown
   peer dependency that was only resolved via lockfile)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 3, 2026 17:04
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.88%. Comparing base (36d126b) to head (c4ae9ea).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #5859      +/-   ##
==========================================
+ Coverage   85.28%   85.88%   +0.59%     
==========================================
  Files         666      666              
  Lines       13247    18841    +5594     
  Branches     1538     3636    +2098     
==========================================
+ Hits        11298    16181    +4883     
- Misses       1818     2297     +479     
- Partials      131      363     +232     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Remove pnpm dedupe --check step (no lockfile to check against)
- Update ajv-decorator and tegg snapshots for @sinclair/typebox new
  exports (EvaluateUnionFast, Match, TakeLeft, IsTemplateLiteralFinite,
  IsTemplateLiteralPattern, TemplateLiteralDecodeUnsafe, _Function_,
  _Object_)
- Add pnpm-lock.yaml to gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

tegg/core/mcp-client/src/HeaderUtil.ts:12

  • mergeHeaders() builds res as Record<string, string | null> and then asserts it to Record<string, string> on return. It would be better to avoid the unsafe cast by only assigning non-null header values (or by initializing res as Record<string, string> and narrowing the get() result), so the emitted types match runtime expectations for HeadersInit.
    // Use global Headers (Node.js 22+) to avoid type mismatch with undici's HeadersInit
    const headers = new globalThis.Headers(headersInit);
    for (const key of headers.keys()) {
      res[key] = headers.get(key);
    }
  }
  return res as Record<string, string>;
}

Comment thread package.json
Comment thread tegg/core/mcp-client/src/HeaderUtil.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.gitignore:
- Line 120: The .gitignore has a malformed combined entry
"ecosystem-ci/examplespnpm-lock.yaml" so split it into two separate ignore lines
("ecosystem-ci/examples" and "pnpm-lock.yaml") and remove any negation that
re-enables the lockfile (e.g., a "!pnpm-lock.yaml" entry) so the pnpm-lock.yaml
is actually ignored; update the .gitignore by adding the two distinct lines and
deleting the un-ignore entry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 09df5447-8be5-4340-a2d5-edc58c35057c

📥 Commits

Reviewing files that changed from the base of the PR and between 36f6b50 and c334f39.

⛔ Files ignored due to path filters (2)
  • tegg/core/ajv-decorator/test/__snapshots__/index.test.ts.snap is excluded by !**/*.snap
  • tegg/core/tegg/test/__snapshots__/ajv.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Comment thread .gitignore Outdated
elrrrrrrr and others added 2 commits April 4, 2026 01:23
CI resolves a newer @sinclair/typebox that exports these additional
functions in ExtendsResult.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 3, 2026 17:23
The snapshot tests captured ALL @sinclair/typebox exports, which break
on every minor version bump.  Replace with targeted assertions that
only check egg's own exports (TransformEnum, AjvInvalidParamError, Ajv)
plus a basic typebox re-export check (Type).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/ci.yml
Comment on lines 41 to 45
- name: Run lint
run: pnpm run lint

- name: Check dedupe
run: pnpm dedupe --check

- name: Run typecheck
run: pnpm run typecheck
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description lists only lockfile removal and switching CI installs to --no-frozen-lockfile, but this workflow change also removes the pnpm dedupe --check step. If this is intentional, please update the PR description; otherwise consider re-adding the dedupe check to keep the existing CI guardrail.

Copilot uses AI. Check for mistakes.
Comment thread package.json
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tegg/core/ajv-decorator/test/index.test.ts`:
- Around line 8-10: The test is asserting a runtime export for the
TypeScript-only interface Ajv (exports.Ajv) which is erased at compile time;
remove the runtime assertion for Ajv in index.test.ts and, if you want
compile-time validation that Ajv is exported, replace it with a type-only check
by importing Ajv with "import type { Ajv }" and assigning a dummy typed variable
(e.g., const _typeCheck: Ajv = {} as any) to ensure the type is exported without
runtime assertions.

In `@tegg/core/tegg/test/ajv.test.ts`:
- Around line 8-10: The test is asserting a TypeScript interface at runtime
(exports.Ajv) which is erased and causes CI failures; remove the runtime
assertion for exports.Ajv from tegg/core/tegg/test/ajv.test.ts and, if you need
compile-time verification that the Ajv type is exported, add a type-only check
using an import type (e.g., import type { Ajv } from '...') and a dummy
assignment like const _typeCheck: Ajv = {} as any in the test file so the type
system verifies the re-export without runtime assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c927abc9-9a75-4e63-b379-55298d55c9a8

📥 Commits

Reviewing files that changed from the base of the PR and between c334f39 and 568e6c3.

⛔ Files ignored due to path filters (2)
  • tegg/core/ajv-decorator/test/__snapshots__/index.test.ts.snap is excluded by !**/*.snap
  • tegg/core/tegg/test/__snapshots__/ajv.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • tegg/core/ajv-decorator/test/index.test.ts
  • tegg/core/tegg/test/ajv.test.ts

Comment thread tegg/core/ajv-decorator/test/index.test.ts Outdated
Comment thread tegg/core/tegg/test/ajv.test.ts Outdated
@elrrrrrrr elrrrrrrr marked this pull request as draft April 3, 2026 17:31
elrrrrrrr and others added 4 commits April 4, 2026 01:31
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ule id format

The decorator stack-trace skip logic only matched filesystem paths
(/@oxc-project/runtime/) but newer vite/rolldown use virtual module
ids like \x00@oxc-project+runtime@0.122.0/helpers/decorate.js.
Match the package@version segment too.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Vitest 4 forbids describe() inside it().  Lift the nested describe
blocks to the top level:
- Move appService initialization to outer beforeAll
- Use beforeEach in raw query describe (outer afterEach truncates)
- Skip multi db tests (require apple/banana tables not in prepare.js)

These nested tests were previously unreachable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The oxc parser now reports parse errors as:
  [PARSE_ERROR] Error: Expected \`;\` but found \`Identifier\`

instead of the older 'failed: Expected ...' format.  Drop the literal
'failed: ' prefix from the regex so both formats match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 7, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm js-beautify is 100.0% likely obfuscated

Confidence: 1.00

Location: Package overview

From: ?npm/egg@4.1.2-beta.9npm/js-beautify@1.15.4

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/js-beautify@1.15.4. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

elrrrrrrr and others added 2 commits April 7, 2026 10:45
The resolve aliases pointed to non-existent root index.ts files
(e.g. ../core-decorator/index.ts) instead of the actual entry points
at src/index.ts.  Under pnpm with proper symlinks the aliases were
never used (pnpm symlinks took priority), but they fail when the
nested node_modules tree changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…gnore

Address Copilot/coderabbit review comments:
- release.yml: switch to --no-frozen-lockfile and drop cache: pnpm
- .gitignore: split malformed 'ecosystem-ci/examplespnpm-lock.yaml'
  into two entries and remove the !pnpm-lock.yaml un-ignore so the
  lockfile is actually ignored

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@elrrrrrrr elrrrrrrr added the chore: gitAction Actions of GitHub such as CI...ect label Apr 7, 2026
@elrrrrrrr elrrrrrrr marked this pull request as ready for review April 7, 2026 03:49
Copilot AI review requested due to automatic review settings April 7, 2026 03:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

tegg/core/mcp-client/src/HeaderUtil.ts:12

  • mergeHeaders builds a Record<string, string | null> (because Headers.get() returns string | null), but then returns it as HeadersInit via as Record<string, string>. This hides a potential null value and can produce a return object that doesn't conform to HeadersInit. Consider using headers.forEach((value, key) => { ... }) (value is always a string) or skipping keys where get() returns null, and then return the object without an unsafe cast.
    // Use global Headers (Node.js 22+) to avoid type mismatch with undici's HeadersInit
    const headers = new globalThis.Headers(headersInit);
    for (const key of headers.keys()) {
      res[key] = headers.get(key);
    }
  }
  return res as Record<string, string>;
}

Comment on lines +105 to +108
// TODO: apple/banana databases need tables created in prepare.js
// These tests were previously unreachable (nested inside an it() block)
describe.skip('multi db', () => {
it('should work for multi database', async () => {
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

describe.skip('multi db', ...) permanently disables the multi-database behavior checks. Since these tests are now reachable (no longer nested under an it()), it would be better to either (a) fix the fixture setup so they can run, or (b) gate them on an explicit env/flag (or use describe.todo) so CI still has an actionable signal rather than silently skipping coverage.

Copilot uses AI. Check for mistakes.
Comment on lines +112 to +114
assert.equal(appleClient.options.database, 'apple');
assert.equal(bananaClient.options.database, 'banana');
assert.equal(bananaClient.options.database, 'banana');
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the "should work for multi database" test, the assertions are duplicated (same property checked twice for both appleClient and bananaClient). This reduces the test's effectiveness and looks like a copy/paste mistake; consider removing the duplicates or asserting a second distinct property/behavior.

Suggested change
assert.equal(appleClient.options.database, 'apple');
assert.equal(bananaClient.options.database, 'banana');
assert.equal(bananaClient.options.database, 'banana');
assert.equal(bananaClient.options.database, 'banana');
assert.notEqual(appleClient, bananaClient);

Copilot uses AI. Check for mistakes.
Comment on lines 26 to 31
declare module 'egg' {
export interface EggModule {}

interface Application {
export interface Application {
eggPrototypeCreatorFactory: typeof EggPrototypeCreatorFactory;
eggPrototypeFactory: EggPrototypeFactory;
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module augmentation exports Application, but other tegg plugins augment egg using non-exported interfaces (e.g. tegg/plugin/controller/src/types.ts:7-12 uses interface Application { ... }). Mixing exported vs non-exported augmentation interfaces can be confusing and may not be necessary. Consider aligning with the existing pattern (remove export and address the linter warning with a targeted suppression), or apply the same approach consistently across augmentation interfaces in this file (including Context).

Copilot uses AI. Check for mistakes.

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --no-frozen-lockfile
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using pnpm install --no-frozen-lockfile in the release workflow makes the release build non-reproducible (dependency graph can change between runs without any git changes), which increases the risk of publishing broken or unverifiable artifacts. Consider keeping releases deterministic (e.g., commit a lockfile and use --frozen-lockfile at least for release.yml), while running the unlocked-deps experiment in a separate CI workflow.

Suggested change
run: pnpm install --no-frozen-lockfile
run: pnpm install --frozen-lockfile

Copilot uses AI. Check for mistakes.
@fengmk2 fengmk2 merged commit 25d86b1 into next Apr 7, 2026
29 of 30 checks passed
@fengmk2 fengmk2 deleted the chore-unlock-deps branch April 7, 2026 04:11
elrrrrrrr added a commit that referenced this pull request Apr 7, 2026
Take next branch's versions of files that already received fixes
in the chore-unlock-deps PR (#5859):
- StackUtil.ts (oxc virtual module id format)
- HeaderUtil.ts (globalThis.Headers)
- Loader.test.ts (oxc parser error format)
- ORM tests (Vitest 4 nesting)
- ajv export tests (targeted assertions)
- vitest config (alias src/index.ts paths)
- types.ts (export Application interface)

Keep HEAD versions of CI workflow files (ci.yml, e2e-test.yml) which
contain the ut migration changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai coderabbitai bot mentioned this pull request Apr 14, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore: gitAction Actions of GitHub such as CI...ect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants