forked from npm/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'npm:latest' into latest
- Loading branch information
Showing
1,043 changed files
with
42,205 additions
and
51,784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
/node_modules/** linguist-generated=false | ||
/package-lock.json linguist-generated=false | ||
# normalize all line endings by default | ||
* text=auto | ||
|
||
# our shell/bin scripts always need to be LF | ||
/bin/* text eol=lf | ||
/workspaces/arborist/bin/index.js text eol=lf | ||
/configure text eol=lf | ||
|
||
# our cmd scripts always need to be CRLF | ||
/bin/**/*.cmd text eol=crlf | ||
|
||
# ignore all line endings in node_modules since we dont control that | ||
/node_modules/** -text | ||
|
||
# the files we write should be LF so they can be generated cross platform | ||
/node_modules/.gitignore text eol=lf | ||
/workspaces/arborist/test/fixtures/.gitignore text eol=lf | ||
/DEPENDENCIES.md text eol=lf | ||
/AUTHORS text eol=lf | ||
|
||
# fixture tarballs should be treated as binary | ||
/workspaces/*/test/fixtures/**/*.tgz binary | ||
|
||
# these hint to GitHub to show these files as not generated so they default to | ||
# showing the full diff in pull requests | ||
/node_modules/** linguist-generated=false | ||
/package-lock.json linguist-generated=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: 'Create Check' | ||
inputs: | ||
name: | ||
required: true | ||
token: | ||
required: true | ||
sha: | ||
required: true | ||
check-name: | ||
default: '' | ||
outputs: | ||
check-id: | ||
value: ${{ steps.create-check.outputs.check_id }} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get Workflow Job | ||
uses: actions/github-script@v6 | ||
id: workflow | ||
env: | ||
JOB_NAME: "${{ inputs.name }}" | ||
SHA: "${{ inputs.sha }}" | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { repo: { owner, repo}, runId, serverUrl } = context | ||
const { JOB_NAME, SHA } = process.env | ||
const job = await github.rest.actions.listJobsForWorkflowRun({ | ||
owner, | ||
repo, | ||
run_id: runId, | ||
per_page: 100 | ||
}).then(r => r.data.jobs.find(j => j.name.endsWith(JOB_NAME))) | ||
return [ | ||
`This check is assosciated with ${serverUrl}/${owner}/${repo}/commit/${SHA}.`, | ||
'Run logs:', | ||
job?.html_url || `could not be found for a job ending with: "${JOB_NAME}"`, | ||
].join(' ') | ||
- name: Create Check | ||
uses: LouisBrunner/[email protected] | ||
id: create-check | ||
with: | ||
token: ${{ inputs.token }} | ||
sha: ${{ inputs.sha }} | ||
status: in_progress | ||
name: ${{ inputs.check-name || inputs.name }} | ||
output: | | ||
{"summary":"${{ steps.workflow.outputs.result }}"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This file is automatically added by @npmcli/template-oss. Do not edit. | ||
|
||
name: 'Install Latest npm' | ||
description: 'Install the latest version of npm compatible with the Node version' | ||
inputs: | ||
node: | ||
description: 'Current Node version' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows | ||
- name: Update Windows npm | ||
if: | | ||
runner.os == 'Windows' && ( | ||
startsWith(inputs.node, 'v10.') || | ||
startsWith(inputs.node, 'v12.') || | ||
startsWith(inputs.node, 'v14.') | ||
) | ||
shell: cmd | ||
run: | | ||
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz | ||
tar xf npm-7.5.4.tgz | ||
cd package | ||
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz | ||
cd .. | ||
rmdir /s /q package | ||
- name: Install Latest npm | ||
shell: bash | ||
env: | ||
NODE_VERSION: ${{ inputs.node }} | ||
working-directory: ${{ runner.temp }} | ||
run: | | ||
MATCH="" | ||
SPECS=("latest" "next-10" "next-9" "next-8" "next-7" "next-6") | ||
echo "node@$NODE_VERSION" | ||
for SPEC in ${SPECS[@]}; do | ||
ENGINES=$(npm view npm@$SPEC --json | jq -r '.engines.node') | ||
echo "Checking if node@$NODE_VERSION satisfies npm@$SPEC ($ENGINES)" | ||
if npx semver -r "$ENGINES" "$NODE_VERSION" > /dev/null; then | ||
MATCH=$SPEC | ||
echo "Found compatible version: npm@$MATCH" | ||
break | ||
fi | ||
done | ||
if [ -z $MATCH ]; then | ||
echo "Could not find a compatible version of npm for node@$NODE_VERSION" | ||
exit 1 | ||
fi | ||
npm i --prefer-online --no-fund --no-audit -g npm@$MATCH | ||
- name: npm Version | ||
shell: bash | ||
run: npm -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.