Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: improve mismatched specifiers error message #9598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 6, 2025

Conversation

KSXGitHub
Copy link
Contributor

@KSXGitHub KSXGitHub commented Jun 3, 2025

Before

specifiers in the lockfile ({"@babel/traverse":"7.25.3","@nestjs/common":"11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2)","@nestjs/core":"11.1.2(@nestjs/common@11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.2.2)(rxjs@7.8.2)","@nestjs/platform-express":"11.1.2(@nestjs/common@11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.2)","@react-native/js-polyfills":"0.74.84","@types/express-serve-static-core":"4.17.37","@xmldom/xmldom":"0.8.7","async":"3.2.2","axios":"1.9.0","babel-loader":"9.1.3(@babel/core@7.27.4)(webpack@5.99.6(@swc/core@1.11.29))","body-parser":"1.20.3","cross-spawn":"7.0.5","decode-uri-component":"0.2.2","fast-xml-parser":"4.2.4","ip":"2.0.1","markdown-it":"13.0.2","minimist":"1.2.6","moment":"2.30.1","node-fetch":"2.6.11","parse-path":"5.0.0","parse-url":"6.0.1","plist":"3.0.4","react":"18.2.0","react-dom":"18.2.0(react@18.2.0)","reflect-metadata":"0.2.2","rxjs":"7.8.2","@eslint/eslintrc":"3.3.1","@eslint/js":"9.28.0","@nestjs/cli":"11.0.7(@swc/cli@0.6.0(@swc/core@1.11.29)(chokidar@4.0.3))(@swc/core@1.11.29)(@types/node@22.15.29)","@nestjs/schematics":"11.0.5(chokidar@4.0.3)(typescript@5.8.3)","@nestjs/testing":"11.1.2(@nestjs/common@11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.2)(@nestjs/platform-express@11.1.2)","@swc/cli":"0.6.0(@swc/core@1.11.29)(chokidar@4.0.3)","@swc/core":"1.11.29","@types/express":"5.0.2","@types/jest":"29.5.14","@types/node":"22.15.29","@types/supertest":"6.0.3","eslint":"9.28.0","eslint-config-prettier":"10.1.5(eslint@9.28.0)","eslint-plugin-prettier":"5.4.1(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.28.0))(eslint@9.28.0)(prettier@3.5.3)","globals":"16.2.0","jest":"29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@22.15.29)(typescript@5.8.3))","prettier":"3.5.3","source-map-support":"0.5.21","supertest":"7.1.1","ts-jest":"29.3.4(@babel/core@7.27.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.4))(jest@29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3)","ts-loader":"9.5.2(typescript@5.8.3)(webpack@5.99.6(@swc/core@1.11.29))","ts-node":"10.9.2(@swc/core@1.11.29)(@types/node@22.15.29)(typescript@5.8.3)","tsconfig-paths":"4.2.0","typescript":"5.8.3","typescript-eslint":"8.33.1(eslint@9.28.0)(typescript@5.8.3)"}) don't match specs in package.json ({"@eslint/eslintrc":"3.3.1","@eslint/js":"9.28.0","@nestjs/cli":"11.0.7(@swc/cli@0.6.0(@swc/core@1.11.29)(chokidar@4.0.3))(@swc/core@1.11.29)(@types/node@22.15.29)","@nestjs/schematics":"11.0.5(chokidar@4.0.3)(typescript@5.8.3)","@nestjs/testing":"11.1.2(@nestjs/common@11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.2)(@nestjs/platform-express@11.1.2)","@swc/cli":"0.6.0(@swc/core@1.11.29)(chokidar@4.0.3)","@swc/core":"1.11.29","@types/express":"5.0.2","@types/jest":"29.5.14","@types/node":"22.15.29","@types/supertest":"6.0.3","eslint":"9.28.0","eslint-config-prettier":"10.1.5(eslint@9.28.0)","eslint-plugin-prettier":"5.4.1(@types/eslint@9.6.1)(eslint-config-prettier@10.1.5(eslint@9.28.0))(eslint@9.28.0)(prettier@3.5.3)","globals":"16.2.0","jest":"29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@22.15.29)(typescript@5.8.3))","prettier":"3.5.3","source-map-support":"0.5.21","supertest":"7.1.1","ts-jest":"29.3.4(@babel/core@7.27.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.4))(jest@29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.11.29)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3)","ts-loader":"9.5.2(typescript@5.8.3)(webpack@5.99.6(@swc/core@1.11.29))","ts-node":"10.9.2(@swc/core@1.11.29)(@types/node@22.15.29)(typescript@5.8.3)","tsconfig-paths":"4.2.0","typescript":"5.8.3","typescript-eslint":"8.33.1(eslint@9.28.0)(typescript@5.8.3)","@babel/traverse":"7.25.3","@nestjs/common":"11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2)","@nestjs/core":"11.1.2(@nestjs/common@11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.2.2)(rxjs@7.8.2)","@nestjs/platform-express":"11.1.2(@nestjs/common@11.1.2(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.2)","@react-native/js-polyfills":"0.74.84","@types/express-serve-static-core":"4.17.37","@xmldom/xmldom":"0.8.7","async":"3.2.2","axios":"1.9.0","babel-loader":"9.1.3","body-parser":"1.20.3","cross-spawn":"7.0.5","decode-uri-component":"0.2.2","fast-xml-parser":"4.2.4","ip":"2.0.1","markdown-it":"13.0.2","minimist":"1.2.6","moment":"2.30.1","node-fetch":"2.6.11","parse-path":"5.0.0","parse-url":"6.0.1","plist":"3.0.4","react":"18.2.0","react-dom":"18.2.0","reflect-metadata":"0.2.2","rxjs":"7.8.2"})

The objects are two big for the human eyes to discern between them.

After

specifiers in the lockfile don't match specifiers in package.json:
* 2 dependencies are mismatched:
  - babel-loader (lockfile: 9.1.3(@babel/core@7.27.4)(webpack@5.99.6(@swc/core@1.11.29)), manifest: 9.1.3)
  - react-dom (lockfile: 18.2.0(react@18.2.0), manifest: 18.2.0)

Only the differences are shown.

@KSXGitHub KSXGitHub requested a review from zkochan as a code owner June 3, 2025 11:31
@zkochan
Copy link
Member

zkochan commented Jun 4, 2025

That's somewhat better but not by a lot

@KSXGitHub KSXGitHub marked this pull request as draft June 5, 2025 02:29
@KSXGitHub
Copy link
Contributor Author

I guess you want to display diff between 2 objects then?

@zkochan
Copy link
Member

zkochan commented Jun 5, 2025

yes

__utils__/tsconfig/tsconfig.json Show resolved Hide resolved
.changeset/nasty-views-sniff.md Outdated Show resolved Hide resolved
@KSXGitHub KSXGitHub marked this pull request as ready for review June 5, 2025 10:04
lockfile/verification/test/satisfiesPackageManifest.ts Outdated Show resolved Hide resolved
@KSXGitHub KSXGitHub requested a review from zkochan June 5, 2025 15:20
@KSXGitHub
Copy link
Contributor Author

The CI fails to fetch Node.js.

@zkochan zkochan merged commit 86e0016 into main Jun 6, 2025
19 checks passed
@zkochan zkochan deleted the improve-error-message-on-mismatched-specs branch June 6, 2025 07:09
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.