Coder Social home page Coder Social logo

pnpm.io's Introduction

pnpm.io

Testing locally

pnpm install
pnpm start

How to publish

Push to the default branch, the website will be deployed automatically.

Algolia Search

If changes should be done to the search index, submit the changes here to the docsearch-configs repository.

pnpm.io's People

Contributors

anandchowdhary avatar await-ovo avatar blackhole1 avatar cuyl avatar dandv avatar fireairforce avatar github-actions[bot] avatar hunter2009 avatar ignacemaes avatar juanpicado avatar kenrick95 avatar ksxgithub avatar lassejlv avatar lenovouser avatar liuliangsir avatar ltdu avatar lvqq avatar m1heng avatar mittalyashu avatar nachoaldamav avatar nareddyt avatar onetom avatar pgonzal avatar renovate[bot] avatar seahindeniz avatar thynson avatar tomchentw avatar tsingwong avatar wmertens avatar zkochan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pnpm.io's Issues

"Edit this page" button doesn't work for v6.x documentation

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.

"Access Denied"?

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:

Снимок экрана 2022-05-21 в 22 09 48

Could you please check your Cloudflare security policies? Perhaps I've tripped up some sort of bot filter?

Best regards,
andre4ik3

New pnpm store documentation

Feature Request

I plan on working on this issue.

Overview

Changes to pnpm store were made in PR pnpm/pnpm#1529.
We need to update the pnpm store docs to match these changes.

Documentation Changes Needed

Essentially anything removed in this diff plus the following:

  • Info on pnpm store usages
  • Section about how pnpm store prune works and how safe it is

Release

These documentation changes should not be released until the changes in pnpm/pnpm#1529 is released.

Windows Subsystem for Linux (WSL) documentation

Feature Request

I plan to add the following documentation.

Overview

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.

Documentation Changes

  • Windows links vs Unix Links
  • Enabling developer mode allows WSL to create windows-compatible links

French version is broken

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.

Add license

License will help with avoiding legal problems while collaborating on the development here.

Why zh folder contains english contents after build

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.

Documentation for `-w` (or `--workspace-root`) is not clear

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.

Search is broken on live site

When testing the site locally, search works fine, but on the deployed website I get the following errors when clicking on the search input:

image

Github Action document update

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

Examples of package dependencies with "@" signs shown as "[email protected]"

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

docs in spanish language

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.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.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
npm
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
nvm
.nvmrc
  • node 18

  • Check this box to trigger a request for Renovate to run again on this repository

Warnings generated when starting website as a developer

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

Filter introduction suggestions

After reading useage of filtering multiple times, I found some filter usage rules.
It had three key elements and two operators:
Elements list

  • package-name
  • dir-name
  • git(commitId or branch)

Two operators

  • ... ellipsis
  • ^

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.

invalid path 'benchmarks/results/yarn/3.2.1 /alotta-files.yaml'

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

example continue integration config for Github Workflows

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

Why does section on Changesets recommend using changeset publish in Github action?

Why does this line in the changeset docs recommend calling a script that uses changeset publish instead of pnpm publish -r?

https://github.com/pnpm/pnpm.github.io/blob/865410bb9629e4caf06c2b9e60e71be3aad4cc6e/docs/using-changesets.md?plain=1#L54

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?

Undocumented `--workspace-packages` options

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

spanish translation

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

Whenever you refresh a page, it gives you old/broken links

Steps to reproduce:

  1. Open an arbitrary link: IE https://pnpm.js.org/workspaces/
  2. The links are pointed to the correct path: https://pnpm.js.org/pnpm-workspace_yaml
  3. refresh the page
  4. The links are pointed to some old path or so: https://pnpm.js.org/pnpm-workspace_yaml/workspaces
  5. The patter is that , whenever you refresh the page /foo/bar becomes /foo/OLDBAR/bar, resulting in 404 error.

cause (?)

Probably some static chunk is getting fetched on refresh

Example CI config for AWS CodeBuild

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!! 🙇🏻‍♂️

Feature SVGs have invalid Alt

<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">

Only allow pnpm sample instructions don't work on Windows cmd.exe

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)\""
  }
}

Migrating to pnpm from Yarn (links)

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):

Docusaurus Issue

Not sure what is going on but when I navigate to pnpm.io this is what is displayed: Screen Shot 2022-04-04 at 12 29 54 AM

Confusing code example

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.

link

https://pnpm.io/cli/fetch#usage-scenario

code

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" ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.