Compare commits

..

No commits in common. "master" and "v4.1.0" have entirely different histories.

18 changed files with 6633 additions and 4295 deletions

10
.github/renovate.json vendored
View File

@ -1,10 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>Borales/renovate-config"],
"packageRules": [
{
"groupName": "GitHub Actions Toolkit",
"matchSourceUrls": ["https://github.com/actions/toolkit{/,}**"]
}
]
}

View File

@ -16,20 +16,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set Node.js 20
uses: actions/setup-node@v4.4.0
- name: Set Node.js 16.x
uses: actions/setup-node@v3.5.1
with:
node-version: 20
node-version: 16.x
- name: Install dependencies
run: yarn
run: npm ci
- name: Rebuild the dist/ directory
run: |
yarn build
yarn package
npm run build
npm run package
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
@ -40,7 +40,7 @@ jobs:
id: diff
# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist

1
.npmrc
View File

@ -1 +0,0 @@
fund=false

1
.nvmrc
View File

@ -1 +0,0 @@
20

View File

@ -1,13 +1,5 @@
# CHANGELOG
## 5.0.0 (3 Feb 2024)
- Switching to `node20`
## 4.2.0 (5 Dec 2022)
- Added proper support for multiple arguments
## 4.1.0 (26 Nov 2022)
- Added `dir` option
@ -18,7 +10,7 @@
## 3.0.0 (8 Jun 2022)
- Migrating to Python3
- Migrating to Python3 (thanks to [@richard-chim](https://github.com/richard-chim))
## 2.1.0 (8 Nov 2019)

21
LICENSE
View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Oleksandr Bordun
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,21 +1,16 @@
# GitHub Actions for Yarn
This GitHub Action is currently compatible with Yarn 1.x only.
> Look [github.com/actions/setup-node](https://github.com/actions/setup-node) for more details.
This Action for [yarn](https://yarnpkg.com) enables arbitrary actions with the `yarn` command-line client, including testing packages and publishing to a registry.
## Usage
> It is required to run `actions/setup-node@v3` before `borales/actions-yarn` in order to setup the desired node version.
An example workflow how to install packages via Yarn (using repository syntax):
```yml
name: CI
on: [push]
jobs:
build:
name: Test

View File

@ -13,5 +13,5 @@ inputs:
required: false
default: ''
runs:
using: 'node20'
using: 'node16'
main: 'dist/index.js'

1093
dist/index.js vendored

File diff suppressed because it is too large Load Diff

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

13
dist/licenses.txt vendored
View File

@ -82,3 +82,16 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
uuid
MIT
The MIT License (MIT)
Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because one or more lines are too long

5764
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@borales/actions-yarn",
"version": "4.2.0",
"version": "4.0.0",
"main": "lib/index.js",
"scripts": {
"build": "tsc",
@ -9,22 +9,22 @@
"lint": "eslint src/**/*.ts",
"package": "ncc build --source-map --license licenses.txt",
"test": "jest",
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
},
"dependencies": {
"@actions/core": "^1.11.1",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3"
"@actions/io": "^1.1.2"
},
"devDependencies": {
"@types/node": "^20.19.34",
"@typescript-eslint/parser": "^6.21.0",
"@vercel/ncc": "^0.38.4",
"eslint-plugin-github": "^4.10.2",
"eslint-plugin-jest": "^27.9.0",
"eslint": "^8.57.1",
"jest": "^29.7.0",
"prettier": "^3.8.1",
"typescript": "^5.9.3"
"@types/node": "^18.11.9",
"@typescript-eslint/parser": "^5.44.0",
"@vercel/ncc": "^0.34.0",
"eslint-plugin-github": "^4.4.1",
"eslint-plugin-jest": "^27.1.6",
"eslint": "^8.28.0",
"jest": "^29.3.1",
"prettier": "^2.8.0",
"typescript": "^4.9.3"
}
}

View File

@ -3,7 +3,7 @@ import {ensureYarnIsInstalled} from './yarn'
import {run} from './run'
import {resolve} from 'path'
const main = async (): Promise<void> => {
const main = async () => {
await ensureYarnIsInstalled()
const cmd: string = getInput('cmd', {required: true})

View File

@ -1,5 +1,5 @@
import {exec} from '@actions/exec'
export const run = async (cmd: string, {cwd}: {cwd: string}): Promise<void> => {
await exec('yarn', cmd.split(' '), {cwd})
export const run = async (cmd: string, {cwd}: {cwd: string}) => {
await exec('yarn', [cmd], {cwd})
}

View File

@ -2,7 +2,7 @@ import {debug, setOutput} from '@actions/core'
import {exec, getExecOutput} from '@actions/exec'
import {which} from '@actions/io'
export const ensureYarnIsInstalled = async (): Promise<void> => {
export const ensureYarnIsInstalled = async () => {
try {
await which('yarn', true)
} catch (e) {

3954
yarn.lock

File diff suppressed because it is too large Load Diff