Skip to content

Conversation

@claudiahdz
Copy link
Contributor

Adds docs for package aliases.

@claudiahdzclaudiahdz requested a review from a team as a code ownerNovember 15, 2019 17:00
@claudiahdzclaudiahdz added Release 6.x work is associated with a specific npm 6 release semver:patch semver patch level for changes labels Nov 15, 2019
Copy link
Contributor

@darcyclarkedarcyclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we determine whether or not removing the line breaks will change the output we generate for the man (ie. manual) pages?

`devDependencies`. To install all modules listed in both `dependencies`
and `devDependencies` when `NODE_ENV` environment variable is set to `production`,
you can use `--production=false`.
and `devDependencies` when `NODE_ENV` environment variable is set to `production`, you can use `--production=false`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claudiahdz I think the reason there were line breaks here was to keep the text column count short in a shell output... not sure if removing them will effect that negatively so that command line docs would span the length of the terminal 🤔


*`npm install <alias>@npm:<name>`:

Install a package under a custom alias. Allows multiple versions of a same-name package side-by-side, more convenient import names for packages with otherwise long ones and using git forks replacements or forked npm packages as replacements. Aliasing works only on your project and does not rename packages in transitive dependencies. Aliases should follow the naming conventions stated in [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM ✅👍


npm install sax

*`npm install <alias>@npm:<name>`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with --save, would this install using the alias notation into package.json?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for example doing npm install jquery1@npm:jquery@1 will look like this on package.json:

 "dependencies":{"jquery1": "npm:jquery@^1.12.4" } 

You can also use the alias for npm related tasks, ex: npm uninstall jquery1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Should the docs be explicit about that?

@npm-deploy-user
Copy link

npm-deploy-user commented Nov 15, 2019

angular-quickstartapp-largeapp-mediumember-quickstartreact-app
prevcurrentstatusprevcurrentstatusprevcurrentstatusprevcurrentstatusprevcurrentstatus
initial install38.4s36.3s39.6s41.4s🛑32.4s33.4s🛑24.9s26.6s🛑31.4s33s🛑
repeat install9s9.2s🛑8s8.4s🛑7.7s8s🛑6.9s7s🛑8.4s9s🛑
with warm cache28.9s29.7s🛑32.6s33.3s🛑27.3s28.3s🛑21.4s23s🛑29.4s27.4s
with node_modules8.7s9.3s🛑7.3s9.5s🛑8.3s8.1s7.4s7.1s8.3s8.6s🛑
with lockfile31.8s28.3s27.8s31.8s🛑26.5s27.6s🛑18.4s20.5s🛑24.4s26.7s🛑
with warm cache and node_modules9s8.9s8.3s7.6s7.7s8.2s🛑8.9s7s10.3s8.5s
with warm cache and lockfile25.2s23.5s24.9s25.7s🛑24s24.9s🛑15.2s15.5s🛑20.2s21.1s🛑
with node_modules and lockfile9.3s9.8s🛑8.6s9.2s🛑8.3s8.5s🛑7.5s7.5s🛑8.8s9.1s🛑

@claudiahdzclaudiahdzforce-pushed the docs/package-aliases branch 2 times, most recently from 7ba97b0 to 7b17efbCompareNovember 15, 2019 18:52
Copy link
Contributor

@darcyclarkedarcyclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a first pass now ✅👍

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release 6.xwork is associated with a specific npm 6 releasesemver:patchsemver patch level for changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@claudiahdz@npm-deploy-user@ljharb@darcyclarke@isaacs@ruyadorno@mikemimik