Skip to content
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

Feat/pnpm i module already in dev deps #7319

Merged
merged 4 commits into from Nov 20, 2023
Merged

Feat/pnpm i module already in dev deps #7319

merged 4 commits into from Nov 20, 2023

Conversation

Yanzi-dev
Copy link
Contributor

pnpm i a-module-already-in-dev-deps will show a message to notice the user that the package was not moved to dependencies.

Close #926

image

Copy link

welcome bot commented Nov 15, 2023

💖 Thanks for opening this pull request! 💖
Please be patient and we will get back to you as soon as we can.

@zkochan zkochan merged commit 45bdc79 into pnpm:main Nov 20, 2023
7 of 10 checks passed
Copy link

welcome bot commented Nov 20, 2023

Congrats on merging your first pull request! 🎉🎉🎉

@brc-dd
Copy link

brc-dd commented Nov 25, 2023

This seems to be printing the message even when there aren't such deps.

Sample run:

~/vitepress main*
❯ pnpm i
Scope: all 4 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +622
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 622, reused 622, downloaded 0, added 622, done

dependencies:
+ @docsearch/css 3.5.2
+ @docsearch/js 3.5.2
+ @types/markdown-it 13.0.7
+ @vitejs/plugin-vue 4.5.0
+ @vue/devtools-api 6.5.1
+ @vueuse/core 10.6.1
+ @vueuse/integrations 10.6.1
+ focus-trap 7.5.4
+ mark.js 8.11.1
+ minisearch 6.3.0
+ mrmime 1.0.1
+ shikiji 0.7.4
+ shikiji-transformers 0.7.4
+ vite 5.0.2
+ vue 3.3.8

devDependencies:
+ @clack/prompts 0.7.0
+ @mdit-vue/plugin-component 1.0.0
+ @mdit-vue/plugin-frontmatter 1.0.0
+ @mdit-vue/plugin-headers 1.0.0
+ @mdit-vue/plugin-sfc 1.0.0
+ @mdit-vue/plugin-title 1.0.0
+ @mdit-vue/plugin-toc 1.0.0
+ @mdit-vue/shared 1.0.0
+ @rollup/plugin-alias 5.0.1
+ @rollup/plugin-commonjs 25.0.7
+ @rollup/plugin-json 6.0.1
+ @rollup/plugin-node-resolve 15.2.3
+ @rollup/plugin-replace 5.0.5
+ @types/compression 1.7.5
+ @types/cross-spawn 6.0.6
+ @types/debug 4.1.12
+ @types/escape-html 1.0.4
+ @types/fs-extra 11.0.4
+ @types/lodash.template 4.5.3
+ @types/mark.js 8.11.12
+ @types/markdown-it-attrs 4.1.3
+ @types/markdown-it-container 2.0.9
+ @types/markdown-it-emoji 2.0.4
+ @types/micromatch 4.0.6
+ @types/minimist 1.2.5
+ @types/node 20.10.0
+ @types/postcss-prefix-selector 1.16.3
+ @types/prompts 2.4.9
+ @vue/shared 3.3.8
+ chokidar 3.5.3
+ compression 1.7.4
+ conventional-changelog-cli 4.1.0
+ cross-spawn 7.0.3
+ debug 4.3.4
+ esbuild 0.19.7
+ escape-html 1.0.3
+ execa 8.0.1
+ fast-glob 3.3.2
+ fs-extra 11.1.1
+ get-port 7.0.0
+ gray-matter 4.0.3
+ lint-staged 15.1.0
+ lodash.template 4.5.0
+ lru-cache 10.1.0
+ markdown-it 13.0.2
+ markdown-it-anchor 8.6.7
+ markdown-it-attrs 4.1.6
+ markdown-it-container 3.0.0
+ markdown-it-emoji 2.0.2
+ markdown-it-mathjax3 4.3.2
+ micromatch 4.0.5
+ minimist 1.2.8
+ nanoid 5.0.3
+ npm-run-all 4.1.5
+ ora 7.0.1
+ path-to-regexp 6.2.1
+ picocolors 1.0.0
+ pkg-dir 8.0.0
+ playwright-chromium 1.40.0
+ polka 1.0.0-next.23
+ postcss-prefix-selector 1.16.0
+ prettier 3.1.0
+ prompts 2.4.2
+ punycode 2.3.1
+ rimraf 5.0.5
+ rollup 4.5.2
+ rollup-plugin-dts 6.1.0
+ rollup-plugin-esbuild 6.1.0
+ semver 7.5.4
+ simple-git-hooks 2.9.0
+ sirv 2.0.3
+ sitemap 7.1.1
+ supports-color 9.4.0
+ typescript 5.3.2
+ vitest 1.0.0-beta.5
+ vue-tsc 1.8.22
+ wait-on 7.2.0

The dependency was already listed in devDependencies.
If you want to make it a prod dependency, then move it manually.

Done in 5.4s

Reproduction: clone vuejs/vitepress ; remove lock file ; run pnpm i

@Mister-Hope
Copy link

Mister-Hope commented Nov 27, 2023

mister-hope@MrHope-Lenovo:~/projects/vuepress/vuepress-theme-hope$ pnpm i
Scope: all 65 workspace projects
 WARN  3 deprecated subdependencies found: @npmcli/move-file@2.0.1, rollup-plugin-terser@7.0.2, sourcemap-codec@1.4.8
Packages: +10 -10
++++++++++----------
Progress: resolved 1884, reused 1826, downloaded 5, added 10, done
node_modules/.pnpm/esbuild@0.19.8/node_modules/esbuild: Running postinstall script, done in 54ms
. prepare$ husky install
│ husky - Git hooks installed
└─ Done in 50ms

devDependencies:
- esbuild 0.19.7
+ esbuild 0.19.8

The dependency was already listed in devDependencies.
If you want to make it a prod dependency, then move it manually.

Done in 1m 4.8s
mister-hope@MrHope-Lenovo:~/projects/vuepress/vuepress-theme-hope$ 

So is my project, I think this pr introduce bugs.

Whenver I bump a pinned devDependency manually and run pnpm i, this msg shows up in the end.

@zkochan @Yanzi-dev Can you 2 check this?

From the other person description, it seems that this rule will be triggered with pnpm i and peform wrong check instead of just checking pnpm i xxx

@Mister-Hope
Copy link

Shall I open a new issue referencing the above 2 comment or can @Yanzi-dev you just manage to fix this in another pr? Expecting you to take responsibility of your contribution🥺

zkochan added a commit that referenced this pull request Nov 27, 2023
…sage that it wasn't moved to dependencies (#7319)"

This reverts commit 45bdc79.
@Yanzi-dev Yanzi-dev deleted the feat/pnpm-i-module-already-in-dev-deps branch November 27, 2023 22:20
@Yanzi-dev Yanzi-dev restored the feat/pnpm-i-module-already-in-dev-deps branch November 27, 2023 22:21
@Yanzi-dev Yanzi-dev deleted the feat/pnpm-i-module-already-in-dev-deps branch November 27, 2023 22:24
@Yanzi-dev
Copy link
Contributor Author

Yanzi-dev commented Nov 27, 2023

@zkochan @Mister-Hope here's the fix #7348 😃👍

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.

pnpm i -S a-module-already-in-dev-deps should show message that it wasn't moved to dependencies
4 participants