mirror of
				https://kkgithub.com/actions/setup-node.git
				synced 2025-11-04 20:51:59 +08:00 
			
		
		
		
	Compare commits
	
		
			16 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 4bb8c45053 | |||
| a251a519bf | |||
| 44c9c18728 | |||
| e715d9a456 | |||
| b1f2e78536 | |||
| 55897e37f3 | |||
| 46903d1fb1 | |||
| 28505ad4d3 | |||
| 2d53d29868 | |||
| 1e163ded31 | |||
| ffde538781 | |||
| 339aa41a8d | |||
| 641e88986e | |||
| e99a7e62b2 | |||
| 0dc69b3a71 | |||
| 52eb8a7524 | 
							
								
								
									
										8
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							@ -28,7 +28,13 @@ jobs:
 | 
				
			|||||||
        run: __tests__/verify-no-unstaged-changes.sh
 | 
					        run: __tests__/verify-no-unstaged-changes.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  test:
 | 
					  test:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ${{ matrix.operating-system }}
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        operating-system: [ubuntu-latest, windows-latest]
 | 
				
			||||||
 | 
					    defaults:
 | 
				
			||||||
 | 
					      run:
 | 
				
			||||||
 | 
					        shell: bash
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v2
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
      - name: Clear tool cache
 | 
					      - name: Clear tool cache
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										76
									
								
								CONDUCT
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								CONDUCT
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,76 @@
 | 
				
			|||||||
 | 
					# Contributor Covenant Code of Conduct
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Our Pledge
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In the interest of fostering an open and welcoming environment, we as
 | 
				
			||||||
 | 
					contributors and maintainers pledge to make participation in our project and
 | 
				
			||||||
 | 
					our community a harassment-free experience for everyone, regardless of age, body
 | 
				
			||||||
 | 
					size, disability, ethnicity, sex characteristics, gender identity and expression,
 | 
				
			||||||
 | 
					level of experience, education, socio-economic status, nationality, personal
 | 
				
			||||||
 | 
					appearance, race, religion, or sexual identity and orientation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Our Standards
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Examples of behavior that contributes to creating a positive environment
 | 
				
			||||||
 | 
					include:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Using welcoming and inclusive language
 | 
				
			||||||
 | 
					* Being respectful of differing viewpoints and experiences
 | 
				
			||||||
 | 
					* Gracefully accepting constructive criticism
 | 
				
			||||||
 | 
					* Focusing on what is best for the community
 | 
				
			||||||
 | 
					* Showing empathy towards other community members
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Examples of unacceptable behavior by participants include:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* The use of sexualized language or imagery and unwelcome sexual attention or
 | 
				
			||||||
 | 
					  advances
 | 
				
			||||||
 | 
					* Trolling, insulting/derogatory comments, and personal or political attacks
 | 
				
			||||||
 | 
					* Public or private harassment
 | 
				
			||||||
 | 
					* Publishing others' private information, such as a physical or electronic
 | 
				
			||||||
 | 
					  address, without explicit permission
 | 
				
			||||||
 | 
					* Other conduct which could reasonably be considered inappropriate in a
 | 
				
			||||||
 | 
					  professional setting
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Our Responsibilities
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Project maintainers are responsible for clarifying the standards of acceptable
 | 
				
			||||||
 | 
					behavior and are expected to take appropriate and fair corrective action in
 | 
				
			||||||
 | 
					response to any instances of unacceptable behavior.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Project maintainers have the right and responsibility to remove, edit, or
 | 
				
			||||||
 | 
					reject comments, commits, code, wiki edits, issues, and other contributions
 | 
				
			||||||
 | 
					that are not aligned to this Code of Conduct, or to ban temporarily or
 | 
				
			||||||
 | 
					permanently any contributor for other behaviors that they deem inappropriate,
 | 
				
			||||||
 | 
					threatening, offensive, or harmful.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Scope
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This Code of Conduct applies within all project spaces, and it also applies when
 | 
				
			||||||
 | 
					an individual is representing the project or its community in public spaces.
 | 
				
			||||||
 | 
					Examples of representing a project or community include using an official
 | 
				
			||||||
 | 
					project e-mail address, posting via an official social media account, or acting
 | 
				
			||||||
 | 
					as an appointed representative at an online or offline event. Representation of
 | 
				
			||||||
 | 
					a project may be further defined and clarified by project maintainers.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Enforcement
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Instances of abusive, harassing, or otherwise unacceptable behavior may be
 | 
				
			||||||
 | 
					reported by contacting the project team at opensource@github.com. All
 | 
				
			||||||
 | 
					complaints will be reviewed and investigated and will result in a response that
 | 
				
			||||||
 | 
					is deemed necessary and appropriate to the circumstances. The project team is
 | 
				
			||||||
 | 
					obligated to maintain confidentiality with regard to the reporter of an incident.
 | 
				
			||||||
 | 
					Further details of specific enforcement policies may be posted separately.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Project maintainers who do not follow or enforce the Code of Conduct in good
 | 
				
			||||||
 | 
					faith may face temporary or permanent repercussions as determined by other
 | 
				
			||||||
 | 
					members of the project's leadership.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Attribution
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
 | 
				
			||||||
 | 
					available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[homepage]: https://www.contributor-covenant.org
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For answers to common questions about this code of conduct, see
 | 
				
			||||||
 | 
					https://www.contributor-covenant.org/faq
 | 
				
			||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
# setup-node
 | 
					# setup-node servicing v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<p align="left">
 | 
					<p align="left">
 | 
				
			||||||
  <a href="https://github.com/actions/setup-node"><img alt="GitHub Actions status" src="https://github.com/actions/setup-node/workflows/Main%20workflow/badge.svg"></a>
 | 
					  <a href="https://github.com/actions/setup-node"><img alt="GitHub Actions status" src="https://github.com/actions/setup-node/workflows/Main%20workflow/badge.svg"></a>
 | 
				
			||||||
@ -108,3 +108,7 @@ The scripts and documentation in this project are released under the [MIT Licens
 | 
				
			|||||||
# Contributions
 | 
					# Contributions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Contributions are welcome!  See [Contributor's Guide](docs/contributors.md)
 | 
					Contributions are welcome!  See [Contributor's Guide](docs/contributors.md)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Code of Conduct
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:wave: Be nice.  See [our code of conduct](CONDUCT)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										7
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							@ -15201,6 +15201,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
					Object.defineProperty(exports, "__esModule", { value: true });
 | 
				
			||||||
const core = __importStar(__webpack_require__(470));
 | 
					const core = __importStar(__webpack_require__(470));
 | 
				
			||||||
 | 
					const exec = __importStar(__webpack_require__(986));
 | 
				
			||||||
const installer = __importStar(__webpack_require__(749));
 | 
					const installer = __importStar(__webpack_require__(749));
 | 
				
			||||||
const auth = __importStar(__webpack_require__(202));
 | 
					const auth = __importStar(__webpack_require__(202));
 | 
				
			||||||
const path = __importStar(__webpack_require__(622));
 | 
					const path = __importStar(__webpack_require__(622));
 | 
				
			||||||
@ -15218,6 +15219,12 @@ function run() {
 | 
				
			|||||||
            if (version) {
 | 
					            if (version) {
 | 
				
			||||||
                yield installer.getNode(version);
 | 
					                yield installer.getNode(version);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            // Output version of node and npm that are being used
 | 
				
			||||||
 | 
					            yield exec.exec('node', ['--version']);
 | 
				
			||||||
 | 
					            // Older versions of Node don't include npm, so don't let this call fail
 | 
				
			||||||
 | 
					            yield exec.exec('npm', ['--version'], {
 | 
				
			||||||
 | 
					                ignoreReturnCode: true
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
            const registryUrl = core.getInput('registry-url');
 | 
					            const registryUrl = core.getInput('registry-url');
 | 
				
			||||||
            const alwaysAuth = core.getInput('always-auth');
 | 
					            const alwaysAuth = core.getInput('always-auth');
 | 
				
			||||||
            if (registryUrl) {
 | 
					            if (registryUrl) {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1278
									
								
								dist/licenses.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1278
									
								
								dist/licenses.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -24,6 +24,7 @@
 | 
				
			|||||||
  "license": "MIT",
 | 
					  "license": "MIT",
 | 
				
			||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@actions/core": "^1.2.2",
 | 
					    "@actions/core": "^1.2.2",
 | 
				
			||||||
 | 
					    "@actions/exec": "^1.0.3",
 | 
				
			||||||
    "@actions/github": "^1.1.0",
 | 
					    "@actions/github": "^1.1.0",
 | 
				
			||||||
    "@actions/http-client": "^1.0.6",
 | 
					    "@actions/http-client": "^1.0.6",
 | 
				
			||||||
    "@actions/io": "^1.0.2",
 | 
					    "@actions/io": "^1.0.2",
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,6 @@
 | 
				
			|||||||
import * as core from '@actions/core';
 | 
					import * as core from '@actions/core';
 | 
				
			||||||
 | 
					import * as exec from '@actions/exec';
 | 
				
			||||||
 | 
					import * as io from '@actions/io';
 | 
				
			||||||
import * as installer from './installer';
 | 
					import * as installer from './installer';
 | 
				
			||||||
import * as auth from './authutil';
 | 
					import * as auth from './authutil';
 | 
				
			||||||
import * as path from 'path';
 | 
					import * as path from 'path';
 | 
				
			||||||
@ -17,6 +19,14 @@ async function run() {
 | 
				
			|||||||
      await installer.getNode(version);
 | 
					      await installer.getNode(version);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Output version of node and npm that are being used
 | 
				
			||||||
 | 
					    await exec.exec('node', ['--version']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Older versions of Node don't include npm, so don't let this call fail
 | 
				
			||||||
 | 
					    await exec.exec('npm', ['--version'], {
 | 
				
			||||||
 | 
					      ignoreReturnCode: true
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const registryUrl: string = core.getInput('registry-url');
 | 
					    const registryUrl: string = core.getInput('registry-url');
 | 
				
			||||||
    const alwaysAuth: string = core.getInput('always-auth');
 | 
					    const alwaysAuth: string = core.getInput('always-auth');
 | 
				
			||||||
    if (registryUrl) {
 | 
					    if (registryUrl) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user