Fix scripts execution compatibility (#10838)

This commit is contained in:
LitoMore 2024-04-21 20:16:09 +08:00 committed by GitHub
parent 7b07b44abe
commit da97f3263f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 13 additions and 13 deletions

View File

@ -64,13 +64,13 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: npm i --ignore-scripts --no-audit --no-fund run: npm i --ignore-scripts --no-audit --no-fund
- name: Update major version in CDN URLs - name: Update major version in CDN URLs
run: ./scripts/release/update-cdn-urls.js run: node scripts/release/update-cdn-urls.js
- name: Update SVGs count milestone - name: Update SVGs count milestone
run: ./scripts/release/update-svgs-count.js run: node scripts/release/update-svgs-count.js
- name: Update slugs table - name: Update slugs table
run: ./scripts/release/update-slugs-table.js run: node scripts/release/update-slugs-table.js
- name: Update SDK Typescript definitions - name: Update SDK Typescript definitions
run: ./scripts/release/update-sdk-ts-defs.js run: node scripts/release/update-sdk-ts-defs.js
- name: Commit version bump - name: Commit version bump
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:

View File

@ -43,9 +43,9 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: npm i --ignore-scripts --no-audit --no-fund run: npm i --ignore-scripts --no-audit --no-fund
- name: Reformat to regular markdown - name: Reformat to regular markdown
run: ./scripts/release/reformat-markdown.js "${{ steps.get-version.outputs.version }}" run: node scripts/release/reformat-markdown.js "${{ steps.get-version.outputs.version }}"
- name: Update SDK Typescript definitions - name: Update SDK Typescript definitions
run: ./scripts/release/update-sdk-ts-defs.js run: node scripts/release/update-sdk-ts-defs.js
- name: Build NodeJS package - name: Build NodeJS package
run: npm run build run: npm run build
- name: Deploy to NPM - name: Deploy to NPM
@ -70,7 +70,7 @@ jobs:
- id: get-version - id: get-version
uses: ./.github/actions/get-version uses: ./.github/actions/get-version
- name: Reformat to regular markdown - name: Reformat to regular markdown
run: ./scripts/release/reformat-markdown.js "${{ steps.get-version.outputs.version }}" run: node scripts/release/reformat-markdown.js "${{ steps.get-version.outputs.version }}"
- name: Configure GIT credentials - name: Configure GIT credentials
run: | run: |
git config user.name "simple-icons[bot]" git config user.name "simple-icons[bot]"

View File

@ -107,16 +107,16 @@
"xo": "0.58.0" "xo": "0.58.0"
}, },
"scripts": { "scripts": {
"build": "./scripts/build/package.js", "build": "node scripts/build/package.js",
"clean": "./scripts/build/clean.js", "clean": "node scripts/build/clean.js",
"format": "npm run prettier -- --write && npm run xo:fix", "format": "npm run prettier -- --write && npm run xo:fix",
"xo:fix": "xo --fix", "xo:fix": "xo --fix",
"prettier": "prettier --cache --ignore-unknown \"**/*.!(js|jsx|mjs|cjs|ts|tsx|mts|cts|svg)\"", "prettier": "prettier --cache --ignore-unknown \"**/*.!(js|jsx|mjs|cjs|ts|tsx|mts|cts|svg)\"",
"lint": "npm run ourlint && npm run prettierlint && npm run jslint && npm run jsonlint && npm run svglint && npm run wslint", "lint": "npm run ourlint && npm run prettierlint && npm run jslint && npm run jsonlint && npm run svglint && npm run wslint",
"ourlint": "./scripts/lint/ourlint.js", "ourlint": "node scripts/lint/ourlint.js",
"prettierlint": "npm run prettier -- --check", "prettierlint": "npm run prettier -- --check",
"jslint": "xo", "jslint": "xo",
"jsonlint": "./scripts/lint/jsonlint.js", "jsonlint": "node scripts/lint/jsonlint.js",
"svglint": "svglint --ci --config svglint.config.mjs icons/*.svg", "svglint": "svglint --ci --config svglint.config.mjs icons/*.svg",
"wslint": "editorconfig-checker", "wslint": "editorconfig-checker",
"prepare": "husky", "prepare": "husky",
@ -125,8 +125,8 @@
"test": "mocha tests --reporter tests/min-reporter.cjs --inline-diffs", "test": "mocha tests --reporter tests/min-reporter.cjs --inline-diffs",
"pretest": "npm run prepublishOnly", "pretest": "npm run prepublishOnly",
"posttest": "npm run postpublish", "posttest": "npm run postpublish",
"get-filename": "./scripts/get-filename.js", "get-filename": "node scripts/get-filename.js",
"add-icon-data": "./scripts/add-icon-data.js" "add-icon-data": "node scripts/add-icon-data.js"
}, },
"engines": { "engines": {
"node": ">=0.12.18" "node": ">=0.12.18"

0
scripts/add-icon-data.js Executable file → Normal file
View File

0
scripts/build/clean.js Executable file → Normal file
View File

0
scripts/build/package.js Executable file → Normal file
View File

0
scripts/get-filename.js Executable file → Normal file
View File

0
scripts/lint/jsonlint.js Executable file → Normal file
View File

0
scripts/lint/ourlint.js Executable file → Normal file
View File

0
scripts/release/reformat-markdown.js Executable file → Normal file
View File

0
scripts/release/update-cdn-urls.js Executable file → Normal file
View File

0
scripts/release/update-sdk-ts-defs.js Executable file → Normal file
View File

0
scripts/release/update-slugs-table.js Executable file → Normal file
View File

0
scripts/release/update-svgs-count.js Executable file → Normal file
View File