pnpm / pnpm.io Goto Github PK
View Code? Open in Web Editor NEWpnpm's website
Home Page: https://pnpm.io
License: MIT License
pnpm's website
Home Page: https://pnpm.io
License: MIT License
<img class="featureImage_ZtzX" src="https://.../img/features/fast.svg" alt="[object Object]" style="width:115px">
<img class="featureImage_ZtzX" src="https://.../img/features/efficient.svg" alt="[object Object]" style="width:115px">
<img class="featureImage_ZtzX" src="https://.../img/features/monorepo.svg" alt="[object Object]" style="width:115px">
<img class="featureImage_ZtzX" src="https://.../img/features/strict.svg" alt="[object Object]" style="width:115px">
Hi, since there is no example config for integrating pnpm
with CodeBuild listed yet in https://pnpm.io/continuous-integration, I wonder if anybody's ever done it before (and probably could suggest an "ideal" config for it). So far I've come up with the following config (simplified) but just not 100% sure if setting the pnpm's home/store somewhere in the current workdir is a good idea or not:
version: 0.2
phases:
install:
runtime-versions:
nodejs: latest
commands:
- curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
- pnpm config set store-dir pnpm/store
pre_build:
on-failure: ABORT
commands:
- WORKDIR=$(pwd)
- PNPM_HOME="${WORKDIR}/pnpm"
build:
commands:
- pnpm install
Thank you!! 🙇🏻♂️
Ran in to ERR_PNPM_FILTER_CHANGED and do not have a clue what it means. There is nothing on the website or in the GitHub issues & discussions.
I think https://pnpm.io/errors needs another entry covering this error mesg.
The setup-node action seems to support pnpm caching
https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# NOTE: pnpm caching support requires pnpm version >= 6.10.0
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.10.0
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
From the homepage, clicking on the "getting started" button routes to https://pnpm.js.org/docs/en/installation.html instead of https://pnpm.js.org/en/installation because it's using docUrl(...)
to build the href path as seen below (same behavior with link in footer).
Pretty sure these should be pageUrl(...)
instead.
I'm a native spanish speaker, if you want I can contribute with that translation, but I don't know where to create the pull request
I've put together some resources to assist those migrating from Yarn to pnpm. I'm not sure if they fit into the docs in any way, but thought I'd put them here to make them at least somewhat discoverable. If there is a spot for them in the docs, happy to open a PR.
Migrating to pnpm
would likely require moving from dependabot to renovatebot (see dependabot/dependabot-core#1736).
Some yarn
--> pnpm
migration PRs:
yarn
--> pnpm
migration commits (couldn't locate PRs):
In progress migration:
Using pnpm (none of these migrated from Yarn as far as I could tell):
In the docs for error codes (https://pnpm.io/errors) ERR_PNPM_OUTDATED_LOCKFILE is not listed and described and the search has no results.
Please list all error codes on https://pnpm.io/errors and describe and/or link them to the according documentation.
On pnpm install
in workspace there is available options --workspace-packages
which is not documented anywhere. Neither --help
nor pnpm.github.io does not provide information about it
In the section, the code is https://get.pnpm.io/v6.16.js
, should it be https://get.pnpm.io/v7.1.js
? In fact, the code is working right, i just a little confused it.
https://pnpm.io/cli/fetch#usage-scenario
FROM node:14
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
# pnpm fetch does require only lockfile
COPY pnpm-lock.yaml ./
RUN pnpm fetch --prod
ADD . ./
RUN pnpm install -r --offline --prod
EXPOSE 8080
CMD [ "node", "server.js" ]
Steps to reproduce:
/foo/bar
becomes /foo/OLDBAR/bar
, resulting in 404 error.cause (?)
Probably some static chunk is getting fetched on refresh
Hi, I think this should mention "running a package" at the end of the line instead of installing. This can be misunderstood, I guess.
Looking at this: https://github.com/pnpm/pnpm.github.io/blob/main/docs/only-allow-pnpm.md
Previous version of the file seemed more understandable: https://github.com/pnpm/pnpm.github.io/blob/5b13aaad33197a1a14fd98c5f65d4d14d03eae5d/docs/only-allow-pnpm.md
Also it doesn't seem to be working on my side anyways for NPM 8.11.0
not sure if I'm doing something wrong...
This might be related to: pnpm/only-allow#11
License will help with avoiding legal problems while collaborating on the development here.
Hi, Its looks like filter popular project in pnpm workspace showcase.(in https://pnpm.io/workspaces)
Is any definition about popular
? Because i am very like pnpm and hope my repo can show in this platform(its my dream :) )
Thanks for your pnpm :)
It's my first time reading the documentation for pnpm and when I stumbled upon this:
Run as if pnpm was started in the root of the workspace instead of the current working directory.
In the section of "-w, --workspace-root", it was not clear to me what type of "workspace" is being referred to there. Is it a VS Code workspace?
Maybe it could be explicitly said that it's a VS Code workspace or something similar.
After reading useage of filtering multiple times, I found some filter usage rules.
It had three key elements and two operators:
Elements list
Two operators
element(except dir-name
) and operators can be mixed, like this:<operators>{package-name}<operators>
. It had 20 combinations like this:
only package-name:(just 1)
1.package-name
package-name with one operator(4 situations):
2. ...package-name
3. package-name...
4. ^package-name
5. package-name^
package-name with two operator(6 situations):
6. ...package-name...
7. ^package-name^
8. ...^package-name
,
9. ...package-name^
10. package-name^...
11. ^package-name...
package-name with three operator(8 situations)
...balabala...
package-name with four operator(1 situations)
...^package-name^...
It's very interesting and easy to get all combinations. So I think filter
can be grouped by elements
and operators
, it's a good way to learn.
When viewing the documentation page for pnpm CLI, I found an issue (reported in #187).
My first reaction was to try to edit the page and submit a PR with the change, but I changed my mind and decided to submit an issue only to validate that my suggested change makes sense. However, I couldn't skip reporting this bug because this may be blocking other possible contributors to suggest their changes because they may not know the way to do that other than clicking that button.
Hi, I just cloned code to my computer, then I run:
pnpm run build
but after build, the Chinese docs is english, not get translated.
Did i miss anything ?
I also tried:
pnpm run crowdin:sync
but got this error:
> @ crowdin:sync /home/ggfan/2-work/新技术研发团队/2-知识体系/pnpm/pnpm-docs
> pnpm copy-docs && pnpm crowdin-upload && pnpm crowdin-download --verbose
> @ copy-docs /home/ggfan/2-work/新技术研发团队/2-知识体系/pnpm/pnpm-docs
> shx rm -rf versioned_docs/version-7.x && shx cp -r docs versioned_docs/version-7.x
> @ crowdin-upload /home/ggfan/2-work/新技术研发团队/2-知识体系/pnpm/pnpm-docs
> pnpm write-translations && crowdin upload sources --auto-update
> @ write-translations /home/ggfan/2-work/新技术研发团队/2-知识体系/pnpm/pnpm-docs
> shx rm -rf i18n/en && docusaurus write-translations
[INFO] 114 translations will be written at "i18n/en/code.json".
[INFO] 10 translations will be written at "i18n/en/docusaurus-theme-classic/navbar.json".
[INFO] 17 translations will be written at "i18n/en/docusaurus-theme-classic/footer.json".
[INFO] 3 translations will be written at "i18n/en/docusaurus-plugin-content-blog/options.json".
[INFO] 1 translations will be written at "i18n/en/docusaurus-plugin-content-docs-community/current.json".
[INFO] 13 translations will be written at "i18n/en/docusaurus-plugin-content-docs/current.json".
[INFO] 13 translations will be written at "i18n/en/docusaurus-plugin-content-docs/version-7.x.json".
[INFO] 13 translations will be written at "i18n/en/docusaurus-plugin-content-docs/version-6.x.json".
❌ Configuration file is invalid. Check the following parameters in your configuration file:
- Required option 'api_token' is missing
- Required option 'project_id' is missing
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Command failed with exit code 1.
AFAIK, even I join crowdin project and set my token and project id, I will not have permission to do so.
#210
Use the scoop installation command to be
scoop install nodejs-lts pnpm
but not
scoop install node-lts pnpm
Github workflows are a fairly popular & free way to run continuous integration. This is what I have come up with for installing with pnpm on ci. I am curious if there is a better way. E.g. something that takes advantage of caching or an action to setup pnpm.
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
# this line here feels a bit hacky
- run: npm i -g pnpm
- run: pnpm install
- run: pnpm test
I can make a quick fix for the warnings below. They should not change the look of the website at all.
$ pnpm start
> @ start /mnt/d/tejun/Github/pnpm/pnpm.github.io/website
> docusaurus-start
LiveReload server started on port 35729
Docusaurus server started on port 3000
Warning: Invalid DOM property `frameborder`. Did you mean `frameBorder`?
in iframe
in div
in div
in div
in PromoSection
in div
in div
in div
in div
in SplashContainer
in HomeSplash
in div
in Index
in div
in body
in html
in Site
Warning: Invalid DOM property `class`. Did you mean `className`?
in blockquote
in div
in div
in div
in div
in Container
in div
in div
in Index
in div
in body
in html
in Site
Warning: Invalid DOM property `charset`. Did you mean `charSet`?
in script
in div
in div
in Container
in div
in div
in Index
in div
in body
in html
in Site
Make a community section with links to articles and talks about pnpm.
Similar to https://reactjs.org/community/support.html or https://docusaurus.io/community/support. The links should be take from https://github.com/pnpm/awesome-pnpm
Blocked until facebook/docusaurus#3810 is fixed in docusaurus.
Page: https://pnpm.js.org/en/cli/add
It seems like the gif is showing a command for pnpm install
instead of pnpm add
. I know it is only a small issue, but wouldn't it be great to fix so nobody like me will get confused?
Hey guys! i would like to start translating the docs to spanish.
Are you interested on this type of stuff? And also how can we move forward?
I am a native spanish speaker.
There seems to have a path that doesn't exist while running git clone.
git clone https://github.com/pnpm/pnpm.github.io.git
After that, I get the error with:
error: invalid path 'benchmarks/results/yarn/3.2.1
/alotta-files.yaml'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
From the github source code I found there exist two different 3.2.1 directory in benchmarks, and one of their name contains a space at the end.
It seems the directory are incorrectly generated by CI. And from github sourcefile, it returns 404:
BTW, the same problem with directory benchmarks/results/yarn/3.2.2
Running pnpm i
fails with this script:
[eval]:1
'!process.env.npm_config_user_agent.startsWith(pnpm/)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Invalid or unexpected token
at new Script (vm.js:86:7)
at createScript (vm.js:268:10)
at Object.runInThisContext (vm.js:316:10)
at Object.<anonymous> ([eval]-wrapper:9:26)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at evalScript (internal/process/execution.js:80:25)
at internal/main/eval_string.js:23:3
Lockfile is up-to-date, resolution step is skipped
ERROR Command failed with exit code 1.
Using double quotes and escaping multiple times makes it work properly. I believe this is due to Windows not interpreting single quotes as string grouping characters.
{
"scripts": {
"preinstall": "node -e \"!process.env.npm_config_user_agent.startsWith(\\\"pnpm/\\\")&&!console.log(\\\"Use `npx pnpm install` to install dependencies in this repository\\n\\\")&&process.exit(1)\""
}
}
Hi, I think the section with the workspace-ranges-workspace
header is missing on the docs/workspaces.md file
I plan to add the following documentation.
We should add some documentation on how pnpm
can be used on a Windows machine with WSL.
This can go under the FAQ or a new article in the Advanced section.
Hello,
I am unable to access the pnpm website due to what looks to be a Cloudflare misconfiguration? I was looking for alternatives to Yarn since v1 is "legacy" and pnpm looks cool, however I am completely unable to access the website. Below is a screenshot:
Could you please check your Cloudflare security policies? Perhaps I've tripped up some sort of bot filter?
Best regards,
andre4ik3
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/benchmark.yml
actions/checkout v3
actions/setup-node v3
.github/workflows/ci.yml
actions/checkout v3
actions/setup-node v3
.github/workflows/deploy.yml
actions/checkout v3
actions/setup-node v3
webfactory/ssh-agent v0.7.0
.github/workflows/translations.yml
actions/checkout v3
actions/setup-node v3
actions-js/push v1.4@156f2b10c3aa000c44dbe75ea7018f32ae999772
benchmarks/package.json
common-tags ^1.8.2
cross-spawn ^7.0.3
fs-extra ^11.0.0
get-folder-size ^3.1.0
load-json-file ^7.0.1
load-yaml-file ^1.0.0
path-key ^4.0.0
pretty-bytes ^6.0.0
pretty-ms ^7.0.1
rimraf ^4.0.0
tempy ^2.0.0
thenify ^3.3.1
touch ^3.1.0
write-yaml-file ^4.2.0
pnpm 7
package.json
@algolia/client-search ^4.14.2
@crowdin/cli 3.9.1
@docusaurus/core 2.3.1
@docusaurus/plugin-client-redirects 2.3.1
@docusaurus/plugin-content-docs 2.3.1
@docusaurus/preset-classic 2.3.1
@types/react ^17.0.49
clsx ^1.2.1
prism-react-renderer ^1.3.5
react ^17.0.2
react-dom ^17.0.2
typescript ^4.8.4
webpack ^5.74.0
@crowdin/crowdin-api-client 1.19.2
@types/node ^18.7.19
shx ^0.3.4
ts-node 10.9.1
pnpm >=7.12.0
.nvmrc
node 18
Hey,
I suspect this is Cloudflare going haywire on the website, but the fact is, all or most examples in the form of [email protected]
are rendered as [email protected]
. For example, on https://pnpm.io/workspaces, this is how the text is rendered:
By default, pnpm will link packages from the workspace if the available packages match the declared ranges. For instance, [email protected] is linked into bar if bar has "foo": "^1.0.0" in its dependencies. However, if bar has "foo": "2.0.0" in dependencies and [email protected] is not in the workspace, [email protected] will be installed from the registry. This behavior introduces some uncertainty.
This can even be confirmed with curl https://pnpm.io/workspaces
— package version examples are [email protected]
even in the source.
Cheers
I suggest adding an example config.yml to the docs.
https://crowdin.com/project/pnpm are 404.
In addition, Language - Chinese (中文) seems to be ineffective.
steps to reproduce:
https://github.com/pnpm/pnpm.github.io/edit/main/versioned_docs/version-6.x/motivation.md
I plan on working on this issue.
Changes to pnpm store
were made in PR pnpm/pnpm#1529.
We need to update the pnpm store
docs to match these changes.
Essentially anything removed in this diff plus the following:
pnpm store usages
pnpm store prune
works and how safe it isThese documentation changes should not be released until the changes in pnpm/pnpm#1529 is released.
Why does this line in the changeset docs recommend calling a script that uses changeset publish
instead of pnpm publish -r
?
I ask because it seems like changests has issues correctly replacing workspace:*
version ranges with the appropriate version from the associated package. I'm citing this comment here and it's not clear to me from subsequent threads and my own experience that this has changed.
I'm having some issues with this in a current project and was wondering what what substantively changeset publish
does different than pnpm publish -r
in the context of the Changeset Github Action?
https://github.com/pnpm/pnpm.github.io/blob/source/docs/cli/add.md#L77
pnpm install <git remote url>
Should this not be an add
?
Hi,
First of all thank you for this nice project 😄
When I was redirecting to the french version website seems broken: https://pnpm.io/fr/.
It seems that everything is fine with this url: https://pnpm.io/fr (no /
at the end).
Thanks,
Regards
Edit:
I found the first link (with a /
at the end) when I was looking for pnpm on google.
The example at
https://pnpm.io/pnpmfile#hooksreadpackagepkg-context-pkg
doesn't work: context.log is not a function
it looks like the signature (pkg, context)
has changed
PNPM is very usable now. All it needs is just some marketing. Maybe Social Sharing might help with it.
Without images, nobody clicks nowadays. It looks weird right now.
http://www.heymeta.com/url/pnpm.js.org
Very simple stuff - https://davidwalsh.name/twitter-cards & https://www.npmjs.com/package/react-doc-meta
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.