Compare commits

..

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

29 changed files with 3706 additions and 6550 deletions

View File

@ -1,12 +1,2 @@
/coverage /coverage
/node_modules
# Dependency directories
node_modules/
jspm_packages/
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

View File

@ -1,3 +0,0 @@
/dist/**
/coverage/**
/node_modules/**

View File

@ -1,12 +1,11 @@
{ {
"env": { "env": {
"node": true, "node": true,
"es6": true, "es2021": true,
"jest": true "jest/globals": true
}, },
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended",
"plugin:jest/recommended", "plugin:jest/recommended",
"plugin:prettier/recommended" "plugin:prettier/recommended"

2
.gitattributes vendored
View File

@ -1,4 +1,2 @@
/.yarn/releases/** binary
/.yarn/plugins/** binary
/dist/** linguist-generated=true /dist/** linguist-generated=true
/lib/** linguist-generated=true /lib/** linguist-generated=true

View File

@ -1,162 +1,22 @@
{ {
"latest": { "latest": {
"id": 216714091, "id": 115584145,
"tag_name": "v5.0.1", "tag_name": "v4.1.0",
"html_url": "https://github.com/upx/upx/releases/tag/v5.0.1", "html_url": "https://github.com/upx/upx/releases/tag/v4.1.0",
"assets": [ "assets": [
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-amd64_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-arm64_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-arm_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-armeb_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-dos.zip", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-dos.zip",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-i386_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-mips_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-mipsel_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-powerpc64le_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-powerpc_linux.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-src.tar.xz", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-src.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-win32.zip", "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win32.zip",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-win64.zip" "https://github.com/upx/upx/releases/download/v4.1.0/upx-4.1.0-win64.zip"
]
},
"v5.0.1": {
"id": 216714091,
"tag_name": "v5.0.1",
"html_url": "https://github.com/upx/upx/releases/tag/v5.0.1",
"assets": [
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-dos.zip",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-src.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-win32.zip",
"https://github.com/upx/upx/releases/download/v5.0.1/upx-5.0.1-win64.zip"
]
},
"v5.0.0": {
"id": 201485424,
"tag_name": "v5.0.0",
"html_url": "https://github.com/upx/upx/releases/tag/v5.0.0",
"assets": [
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-dos.zip",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-src.tar.xz",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-win32.zip",
"https://github.com/upx/upx/releases/download/v5.0.0/upx-5.0.0-win64.zip"
]
},
"v4.2.4": {
"id": 154915740,
"tag_name": "v4.2.4",
"html_url": "https://github.com/upx/upx/releases/tag/v4.2.4",
"assets": [
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-dos.zip",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-src.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-win32.zip",
"https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-win64.zip"
]
},
"v4.2.3": {
"id": 148738382,
"tag_name": "v4.2.3",
"html_url": "https://github.com/upx/upx/releases/tag/v4.2.3",
"assets": [
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-dos.zip",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-src.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-win32.zip",
"https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-win64.zip"
]
},
"v4.2.2": {
"id": 135721197,
"tag_name": "v4.2.2",
"html_url": "https://github.com/upx/upx/releases/tag/v4.2.2",
"assets": [
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-dos.zip",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-src.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-win32.zip",
"https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-win64.zip"
]
},
"v4.2.1": {
"id": 127511011,
"tag_name": "v4.2.1",
"html_url": "https://github.com/upx/upx/releases/tag/v4.2.1",
"assets": [
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-dos.zip",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-src.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-win32.zip",
"https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-win64.zip"
]
},
"v4.2.0": {
"id": 126740650,
"tag_name": "v4.2.0",
"html_url": "https://github.com/upx/upx/releases/tag/v4.2.0",
"assets": [
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-amd64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-arm64_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-arm_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-armeb_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-dos.zip",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-i386_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-mips_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-mipsel_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-powerpc64le_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-powerpc_linux.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-src.tar.xz",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-win32.zip",
"https://github.com/upx/upx/releases/download/v4.2.0/upx-4.2.0-win64.zip"
] ]
}, },
"v4.1.0": { "v4.1.0": {

View File

@ -4,10 +4,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on: on:
schedule: schedule:
- cron: '0 10 * * *' - cron: '0 10 * * *'
@ -36,7 +32,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- -
name: Download files name: Download files
shell: bash shell: bash
@ -73,7 +69,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- -
name: UPX name: UPX
uses: ./ uses: ./

View File

@ -4,10 +4,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on: on:
push: push:
branches: branches:
@ -23,17 +19,12 @@ on:
jobs: jobs:
labeler: labeler:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
# same as global permissions
contents: read
# required to update labels
issues: write
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- -
name: Run Labeler name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5 uses: crazy-max/ghaction-github-labeler@v4
with: with:
dry-run: ${{ github.event_name == 'pull_request' }} dry-run: ${{ github.event_name == 'pull_request' }}

View File

@ -4,10 +4,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on: on:
push: push:
branches: branches:
@ -23,16 +19,19 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
-
name: Validate
uses: docker/bake-action@v3
with:
targets: validate
- -
name: Test name: Test
uses: docker/bake-action@v6 uses: docker/bake-action@v3
with: with:
source: .
targets: test targets: test
- -
name: Upload coverage name: Upload coverage
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v3
with: with:
files: ./coverage/clover.xml file: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -4,10 +4,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
@ -21,7 +17,7 @@ on:
jobs: jobs:
generate: generate:
uses: crazy-max/.github/.github/workflows/releases-json.yml@fa6141aedf23596fb8bdcceab9cce8dadaa31bd9 uses: crazy-max/.github/.github/workflows/releases-json.yml@6dc31870ca6c4f8489bf5a408ab38fae60f47eec
with: with:
repository: upx/upx repository: upx/upx
artifact_name: upx-releases-json artifact_name: upx-releases-json
@ -31,19 +27,15 @@ jobs:
open-pr: open-pr:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
permissions:
# required to create PR
contents: write
pull-requests: write
needs: needs:
- generate - generate
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- -
name: Download name: Download
uses: actions/download-artifact@v4 uses: actions/download-artifact@v3
with: with:
name: upx-releases-json name: upx-releases-json
path: .github path: .github
@ -53,7 +45,7 @@ jobs:
git add -A . git add -A .
- -
name: Create PR name: Create PR
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with: with:
base: master base: master
branch: bot/upx-releases-json branch: bot/upx-releases-json

View File

@ -1,49 +0,0 @@
name: validate
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
push:
branches:
- 'master'
- 'releases/v*'
pull_request:
paths-ignore:
- '.github/upx-releases.json'
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v6
with:
target: validate
validate:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Validate
uses: docker/bake-action@v6
with:
targets: ${{ matrix.target }}

71
.gitignore vendored
View File

@ -1,5 +1,12 @@
# https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore /.dev
node_modules/
lib
# Jetbrains
/.idea
/*.iml
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs # Logs
logs logs
*.log *.log
@ -7,7 +14,6 @@ npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
lerna-debug.log* lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html) # Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@ -18,14 +24,34 @@ pids
*.seed *.seed
*.pid.lock *.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul # Coverage directory used by tools like istanbul
coverage coverage
*.lcov *.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories # Dependency directories
node_modules/
jspm_packages/ jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache # TypeScript cache
*.tsbuildinfo *.tsbuildinfo
@ -35,19 +61,36 @@ jspm_packages/
# Optional eslint cache # Optional eslint cache
.eslintcache .eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file # Yarn Integrity file
.yarn-integrity .yarn-integrity
# dotenv environment variable files # dotenv environment variables file
.env .env
.env.development.local .env.test
.env.test.local
.env.production.local
.env.local
# yarn v2 # parcel-bundler cache (https://parceljs.org/)
.yarn/cache .cache
.yarn/unplugged
.yarn/build-state.yml # next.js build output
.yarn/install-state.gz .next
.pnp.*
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/

View File

@ -1,6 +0,0 @@
# Dependency directories
node_modules/
jspm_packages/
# yarn v2
.yarn/

File diff suppressed because one or more lines are too long

View File

@ -1,13 +0,0 @@
logFilters:
- code: YN0013
level: discard
- code: YN0019
level: discard
- code: YN0076
level: discard
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020-2025 CrazyMax Copyright (c) 2020-2023 CrazyMax
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -34,10 +34,10 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- -
name: Run UPX name: Run UPX
uses: crazy-max/ghaction-upx@v3 uses: crazy-max/ghaction-upx@v2
with: with:
version: latest version: latest
files: | files: |
@ -59,10 +59,10 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v3
- -
name: Install UPX name: Install UPX
uses: crazy-max/ghaction-upx@v3 uses: crazy-max/ghaction-upx@v2
with: with:
install-only: true install-only: true
- -
@ -74,7 +74,7 @@ jobs:
### inputs ### inputs
The following inputs can be used as `step.with` keys Following inputs can be used as `step.with` keys
| Name | Type | Default | Description | | Name | Type | Default | Description |
|----------------|--------|----------|------------------------------------------------------------| |----------------|--------|----------|------------------------------------------------------------|
@ -89,10 +89,11 @@ This action is only available for Linux and Windows [virtual environments](https
## Contributing ## Contributing
Want to contribute? Awesome! The most basic way to show your support is to star Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. If
the project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) you want to open a pull request, please read the [contributing guidelines](.github/CONTRIBUTING.md).
or by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this
journey continues indefinitely! You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) or by
making a [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely!
Thanks again for your support, it is much appreciated! :pray: Thanks again for your support, it is much appreciated! :pray:

View File

@ -18,7 +18,7 @@ describe('getRelease', () => {
}); });
it('unknown release', async () => { it('unknown release', async () => {
await expect(installer.getRelease('foo')).rejects.toThrow( await expect(installer.getRelease('foo')).rejects.toThrowError(
new Error( new Error(
'Cannot find UPX release foo in https://raw.githubusercontent.com/crazy-max/ghaction-upx/master/.github/upx-releases.json' 'Cannot find UPX release foo in https://raw.githubusercontent.com/crazy-max/ghaction-upx/master/.github/upx-releases.json'
) )

View File

@ -28,5 +28,5 @@ inputs:
runs: runs:
using: 'node20' using: 'node16'
main: 'dist/index.js' main: 'dist/index.js'

View File

@ -1,12 +1,3 @@
comment: false comment: false
coverage:
status:
project: # settings affecting project coverage
default:
target: auto # auto % coverage target
threshold: 5% # allow for 5% reduction of coverage without failing
patch: off
github_checks: github_checks:
annotations: false annotations: false

View File

@ -1,20 +1,13 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG NODE_VERSION=20 ARG NODE_VERSION=16
FROM node:${NODE_VERSION}-alpine AS base FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache cpio findutils git RUN apk add --no-cache cpio findutils git
WORKDIR /src WORKDIR /src
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache <<EOT
corepack enable
yarn --version
yarn config set --home enableTelemetry 0
EOT
FROM base AS deps FROM base AS deps
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn install && mkdir /vendor && cp yarn.lock /vendor yarn install && mkdir /vendor && cp yarn.lock /vendor
@ -35,7 +28,6 @@ EOT
FROM deps AS build FROM deps AS build
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run build && mkdir /out && cp -Rf dist /out/ yarn run build && mkdir /out && cp -Rf dist /out/
@ -56,7 +48,6 @@ EOT
FROM deps AS format FROM deps AS format
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run format \ yarn run format \
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
@ -66,7 +57,6 @@ COPY --from=format /out /
FROM deps AS lint FROM deps AS lint
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run lint yarn run lint
@ -74,9 +64,8 @@ FROM deps AS test
ENV RUNNER_TEMP=/tmp/github_runner ENV RUNNER_TEMP=/tmp/github_runner
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run test --coverage --coverageDirectory=/tmp/coverage yarn run test --coverageDirectory=/tmp/coverage
FROM scratch AS test-coverage FROM scratch AS test-coverage
COPY --from=test /tmp/coverage / COPY --from=test /tmp/coverage /

4
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

46
dist/licenses.txt generated vendored
View File

@ -71,28 +71,6 @@ The above copyright notice and this permission notice shall be included in all c
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. 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.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
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.
balanced-match balanced-match
MIT MIT
(MIT) (MIT)
@ -383,29 +361,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
undici uuid
MIT MIT
MIT License The MIT License (MIT)
Copyright (c) Matteo Collina and Undici contributors Copyright (c) 2010-2020 Robert Kieffer and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy 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:
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 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 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.
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.
wrappy wrappy

View File

@ -1,9 +1,3 @@
target "_common" {
args = {
BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1
}
}
group "default" { group "default" {
targets = ["build"] targets = ["build"]
} }
@ -23,7 +17,6 @@ target "build" {
} }
target "build-validate" { target "build-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "build-validate" target = "build-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]
@ -48,7 +41,6 @@ target "vendor-update" {
} }
target "vendor-validate" { target "vendor-validate" {
inherits = ["_common"]
dockerfile = "dev.Dockerfile" dockerfile = "dev.Dockerfile"
target = "vendor-validate" target = "vendor-validate"
output = ["type=cacheonly"] output = ["type=cacheonly"]

View File

@ -1,12 +1,9 @@
module.exports = { module.exports = {
clearMocks: true, clearMocks: true,
testEnvironment: 'node',
moduleFileExtensions: ['js', 'ts'], moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'], testMatch: ['**/*.test.ts'],
transform: { transform: {
'^.+\\.ts$': 'ts-jest' '^.+\\.ts$': 'ts-jest'
}, },
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
coveragePathIgnorePatterns: ['dist/', 'node_modules/', '__tests__/'],
verbose: true verbose: true
}; };

View File

@ -4,13 +4,9 @@
"main": "lib/main.js", "main": "lib/main.js",
"scripts": { "scripts": {
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt", "build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
"lint": "yarn run prettier && yarn run eslint", "lint": "eslint src/**/*.ts __tests__/**/*.ts",
"format": "yarn run prettier:fix && yarn run eslint:fix", "format": "eslint --fix src/**/*.ts __tests__/**/*.ts",
"eslint": "eslint --max-warnings=0 .", "test": "jest --coverage",
"eslint:fix": "eslint --fix .",
"prettier": "prettier --check \"./**/*.ts\"",
"prettier:fix": "prettier --write \"./**/*.ts\"",
"test": "jest",
"all": "yarn run build && yarn run format && yarn test" "all": "yarn run build && yarn run format && yarn test"
}, },
"repository": { "repository": {
@ -23,26 +19,25 @@
], ],
"author": "CrazyMax", "author": "CrazyMax",
"license": "MIT", "license": "MIT",
"packageManager": "yarn@3.6.3",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/http-client": "^2.2.3", "@actions/http-client": "^2.1.1",
"@actions/tool-cache": "^2.0.2" "@actions/tool-cache": "^2.0.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.6.0", "@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^6.6.0", "@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^6.6.0", "@typescript-eslint/parser": "^5.14.0",
"@vercel/ncc": "^0.38.0", "@vercel/ncc": "^0.33.3",
"eslint": "^8.49.0", "eslint": "^8.11.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.2.3", "eslint-plugin-jest": "^26.1.1",
"eslint-plugin-prettier": "^5.0.0", "eslint-plugin-prettier": "^4.0.0",
"jest": "^29.6.4", "jest": "^27.2.5",
"prettier": "^3.0.3", "prettier": "^2.3.1",
"ts-jest": "^29.1.1", "ts-jest": "^27.1.2",
"ts-node": "^10.9.1", "ts-node": "^10.7.0",
"typescript": "^5.2.2" "typescript": "^4.4.4"
} }
} }

View File

@ -63,30 +63,11 @@ export async function getUPX(version: string): Promise<string> {
} }
function getName(version: string): string { function getName(version: string): string {
let platform: string; let platform = '';
switch (osArch) { if (osPlat == 'win32') {
case 'x64': { platform = osArch == 'x64' ? 'win64' : 'win32';
platform = osPlat === 'win32' ? 'win64' : 'amd64_' + osPlat; } else if (osPlat == 'linux') {
break; platform = osArch == 'x64' ? 'amd64_linux' : 'i386_linux';
}
case 'x32': {
platform = osPlat === 'win32' ? 'win32' : 'i386_' + osPlat;
break;
}
case 'arm': {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const arm_version = (process.config.variables as any).arm_version;
if (arm_version === '7') {
platform = 'armeb_' + osPlat;
} else {
platform = 'arm_' + osPlat;
}
break;
}
default: {
platform = osArch + '_' + osPlat;
break;
}
} }
return util.format('upx-%s-%s', version, platform); return util.format('upx-%s-%s', version, platform);
} }

View File

@ -1,12 +1,13 @@
{ {
"compilerOptions": { "compilerOptions": {
"esModuleInterop": true,
"target": "es6", "target": "es6",
"module": "commonjs", "module": "commonjs",
"newLine": "lf", "newLine": "lf",
"outDir": "./lib", "outDir": "./lib",
"rootDir": "./src", "rootDir": "./src",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": false, "noImplicitAny": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"useUnknownInCatchVariables": false, "useUnknownInCatchVariables": false,

9139
yarn.lock

File diff suppressed because it is too large Load Diff