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: support pnpm #22

Merged
merged 1 commit into from
Apr 5, 2021
Merged

feat: support pnpm #22

merged 1 commit into from
Apr 5, 2021

Conversation

ilyp
Copy link
Contributor

@ilyp ilyp commented Mar 31, 2021

image
The value of "module.paths" of using "npm i" or "pnpm i" is different.

// npm
[
  '/Users/userA/ProjectB/node_modules/intelli-espower-loader/node_modules',
  '/Users/userA/ProjectB/node_modules',
  '/Users/userA/node_modules',
  '/Users/node_modules',
  '/node_modules'
]
// pnpm
[
  '/Users/userA/ProjectB/node_modules/.pnpm/[email protected]/node_modules/intelli-espower-loader/node_modules',
  '/Users/userA/ProjectB/node_modules/.pnpm/[email protected]/node_modules',
  '/Users/userA/ProjectB/node_modules/.pnpm/node_modules',
  '/Users/userA/ProjectB/node_modules',
  '/Users/userA/node_modules',
  '/Users/node_modules',
  '/node_modules'
]

So in file "lib/get-package-json.js", The function "findPackageDir" should ignore ".pnpm".

@twada
Copy link
Member

twada commented Mar 31, 2021

@ilyp Thank you for your contribution! Would you add description for this pull-request?

@ilyp
Copy link
Contributor Author

ilyp commented Apr 1, 2021

@ilyp Thank you for your contribution! Would you add description for this pull-request?

ok

@ilyp
Copy link
Contributor Author

ilyp commented Apr 1, 2021

Now with "pnpm install", running the test will throw error:

✖ ERROR: Cannot find module '/Users/userA/ProjectB/node_modules/.pnpm/[email protected]/package.json'

@ilyp ilyp mentioned this pull request Apr 2, 2021
@twada
Copy link
Member

twada commented Apr 5, 2021

@ilyp Thanks and LGTM!
I'll cut a new release soon.

@twada twada merged commit 8fcad34 into power-assert-js:master Apr 5, 2021
@twada
Copy link
Member

twada commented Apr 7, 2021

@ilyp FYI: 1.1.0 is out.
https://github.com/power-assert-js/intelli-espower-loader/releases/tag/v1.1.0

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