Skip to content

Commit f174f8c

Browse files
committed
📦 Chore(custom): move yarn to pnpm
1 parent 8f3c417 commit f174f8c

14 files changed

Lines changed: 8077 additions & 5905 deletions

File tree

.eslintrc.js

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
module.exports = {
2-
extends: 'standard-with-typescript',
2+
root: true,
3+
env: {
4+
node: true,
5+
es2022: true
6+
},
7+
parser: '@typescript-eslint/parser',
38
parserOptions: {
4-
project: './tsconfig.json'
9+
project: './tsconfig.json',
10+
sourceType: 'module'
511
},
12+
plugins: ['@typescript-eslint', 'import', 'promise'],
13+
extends: [
14+
'eslint:recommended',
15+
'plugin:@typescript-eslint/recommended',
16+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
17+
'plugin:import/recommended',
18+
'plugin:import/typescript',
19+
'plugin:promise/recommended',
20+
'eslint-config-prettier'
21+
],
622
rules: {
7-
'@typescript-eslint/strict-boolean-expressions': 0,
8-
// https://github.com/typescript-eslint/typescript-eslint/blob/ef88a696a157f617d38ce6d49207a4a4a089a19b/packages/eslint-plugin/docs/rules/naming-convention.md#enforce-that-interface-names-do-not-begin-with-an-i
23+
'@typescript-eslint/strict-boolean-expressions': 'off',
24+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
25+
'@typescript-eslint/return-await': 'off',
26+
'@typescript-eslint/no-floating-promises': 'off',
27+
'@typescript-eslint/no-non-null-assertion': 'off',
928
'@typescript-eslint/naming-convention': [
1029
'error',
1130
{
1231
selector: 'interface',
1332
format: ['PascalCase'],
14-
custom: {
15-
regex: '^I[A-Z]',
16-
match: true
17-
}
33+
custom: { regex: '^I[A-Z]', match: true }
1834
}
1935
],
20-
'@typescript-eslint/prefer-nullish-coalescing': 0,
21-
'@typescript-eslint/return-await': 0,
22-
'@typescript-eslint/no-floating-promises': 0,
23-
'@typescript-eslint/no-non-null-assertion': 0
36+
'import/no-unresolved': 'off' // handled by TS
2437
}
2538
}

.github/workflows/alpha.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/manually.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- alpha
8+
workflow_dispatch:
9+
inputs:
10+
publish_tag:
11+
description: 'npm tag to publish with (default: latest)'
12+
required: false
13+
default: 'latest'
14+
15+
jobs:
16+
build-and-publish:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
run_install: false
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version: 20
34+
registry-url: https://registry.npmjs.org
35+
cache: pnpm
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Build
41+
run: pnpm run build
42+
43+
- name: Publish (master)
44+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
45+
run: pnpm publish --access public
46+
env:
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
49+
- name: Publish (alpha)
50+
if: github.event_name == 'push' && github.ref == 'refs/heads/alpha'
51+
run: pnpm publish --tag alpha --access public
52+
env:
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54+
55+
- name: Publish (manual)
56+
if: github.event_name == 'workflow_dispatch'
57+
run: pnpm publish --tag "${{ inputs.publish_tag || 'latest' }}" --access public
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ dist/
44
yarn-error.log
55
temp.js
66
package-lock.json
7-
test.jpg
7+
test.jpg
8+
.serena/
9+
.pnpm-store/

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
22

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ tsconfig.json
66
.vscode/
77
src/
88
.travis.yml
9+
.serena/
10+
.pnpm-store/

package.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"start": "node ./bin/picgo",
16-
"lint": "eslint src/**/*.ts && npm run build",
16+
"lint": "eslint . --ext .ts",
1717
"test": "echo \"Error: no test specified\" && exit 1",
1818
"build": "cross-env NODE_ENV=production rimraf ./dist && rollup -c rollup.config.js",
1919
"dev": "cross-env NODE_ENV=development rollup -c rollup.config.js -w",
@@ -50,47 +50,46 @@
5050
"author": "Molunerfinn",
5151
"license": "MIT",
5252
"devDependencies": {
53-
"@picgo/bump-version": "^1.1.2",
54-
"@rollup/plugin-commonjs": "^21.0.0",
55-
"@rollup/plugin-json": "^4.1.0",
56-
"@rollup/plugin-node-resolve": "^13.0.5",
57-
"@rollup/plugin-replace": "^3.0.0",
53+
"@picgo/bump-version": "^2.0.0",
54+
"@rollup/plugin-commonjs": "^29.0.0",
55+
"@rollup/plugin-json": "^6.1.0",
56+
"@rollup/plugin-node-resolve": "^16.0.3",
57+
"@rollup/plugin-replace": "^6.0.3",
58+
"@rollup/plugin-terser": "^0.4.4",
59+
"@rollup/plugin-typescript": "^12.3.0",
5860
"@types/cross-spawn": "^6.0.0",
5961
"@types/ejs": "^3.0.5",
6062
"@types/fs-extra": "^5.0.4",
63+
"@types/glob": "^7.2.0",
6164
"@types/image-size": "^0.0.29",
6265
"@types/inquirer": "^0.0.42",
6366
"@types/js-yaml": "^4.0.5",
6467
"@types/lodash": "^4.14.175",
6568
"@types/md5": "^2.1.32",
6669
"@types/mime-types": "^2.1.0",
6770
"@types/minimatch": "^3.0.3",
68-
"@types/node": "16.11.7",
71+
"@types/node": "20.19.26",
6972
"@types/resolve": "^0.0.8",
7073
"@types/rimraf": "^3.0.0",
7174
"@types/tunnel": "^0.0.3",
72-
"@typescript-eslint/eslint-plugin": "3",
73-
"@typescript-eslint/parser": "^3.2.0",
74-
"babel-eslint": "^10.1.0",
75-
"builtins": "^4.0.0",
75+
"@typescript-eslint/eslint-plugin": "^8.49.0",
76+
"@typescript-eslint/parser": "^8.49.0",
77+
"commitizen": "^4.3.1",
7678
"conventional-changelog": "^3.0.6",
7779
"copyfiles": "^2.1.0",
7880
"cross-env": "^7.0.3",
7981
"cz-customizable": "^5.10.0",
80-
"eslint": "7",
81-
"eslint-config-standard-with-typescript": "^18.0.2",
82-
"eslint-plugin-import": "2",
83-
"eslint-plugin-node": "11",
84-
"eslint-plugin-promise": "4",
85-
"eslint-plugin-standard": "4",
82+
"eslint": "^9.39.1",
83+
"eslint-config-prettier": "^10.1.8",
84+
"eslint-plugin-import": "^2.32.0",
85+
"eslint-plugin-promise": "^7.2.1",
8686
"execa": "^5.1.1",
87-
"husky": "^1.3.1",
87+
"husky": "^9.1.7",
8888
"pre-commit": "^1.2.2",
89-
"rollup": "^2.58.0",
89+
"rollup": "^4.53.3",
90+
"rollup-plugin-copy": "^3.5.0",
9091
"rollup-plugin-string": "^3.0.0",
91-
"rollup-plugin-terser": "^7.0.2",
92-
"rollup-plugin-typescript2": "^0.30.0",
93-
"typescript": "^4.8.2"
92+
"typescript": "^5.9.3"
9493
},
9594
"dependencies": {
9695
"@picgo/i18n": "^1.0.0",
@@ -103,6 +102,7 @@
103102
"dayjs": "^1.7.4",
104103
"download-git-repo": "^3.0.2",
105104
"ejs": "^2.6.1",
105+
"form-data": "^4.0.5",
106106
"fs-extra": "^6.0.1",
107107
"globby": "^11.0.4",
108108
"image-size": "^0.8.3",
@@ -116,7 +116,7 @@
116116
"minimist": "^1.2.5",
117117
"qiniu": "^7.2.1",
118118
"resolve": "^1.8.1",
119-
"rimraf": "^3.0.2",
119+
"rimraf": "^6.1.2",
120120
"tunnel": "^0.0.6"
121121
},
122122
"repository": {
@@ -128,6 +128,6 @@
128128
},
129129
"plugins": {},
130130
"engines": {
131-
"node": ">= 12.0.0"
131+
"node": ">= 20.0.0"
132132
}
133133
}

0 commit comments

Comments
 (0)