@adbayb/stack 2.31.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configs/eslint/presets/react.js +15 -0
- package/configs/eslint/presets/unicorn.js +3 -0
- package/dist/index.js +8 -6
- package/package.json +15 -15
- package/templates/multi-projects/.github/workflows/continuous_delivery.yml +3 -7
- package/templates/multi-projects/.github/workflows/conventional_commit.yml +1 -1
- package/templates/multi-projects/.github/workflows/dependency_changelog.yml +2 -2
- package/templates/multi-projects/.github/workflows/workflow.yml +3 -7
- package/templates/multi-projects/package.json.tmpl +1 -1
- package/templates/single-project/.github/workflows/continuous_delivery.yml +3 -7
- package/templates/single-project/.github/workflows/conventional_commit.yml +1 -1
- package/templates/single-project/.github/workflows/dependency_changelog.yml +2 -2
- package/templates/single-project/.github/workflows/workflow.yml +3 -7
- package/templates/single-project/package.json.tmpl +1 -1
|
@@ -76,8 +76,23 @@ export const config = createConfig(
|
|
|
76
76
|
"@eslint-react/web-api/no-leaked-interval": "error",
|
|
77
77
|
"@eslint-react/web-api/no-leaked-resize-observer": "error",
|
|
78
78
|
"@eslint-react/web-api/no-leaked-timeout": "error",
|
|
79
|
+
"react-hooks/component-hook-factories": "error",
|
|
80
|
+
"react-hooks/config": "error",
|
|
81
|
+
"react-hooks/error-boundaries": "error",
|
|
79
82
|
"react-hooks/exhaustive-deps": "warn",
|
|
83
|
+
"react-hooks/gating": "error",
|
|
84
|
+
"react-hooks/globals": "error",
|
|
85
|
+
"react-hooks/immutability": "error",
|
|
86
|
+
"react-hooks/incompatible-library": "error",
|
|
87
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
88
|
+
"react-hooks/purity": "error",
|
|
89
|
+
"react-hooks/refs": "error",
|
|
80
90
|
"react-hooks/rules-of-hooks": "error",
|
|
91
|
+
"react-hooks/set-state-in-effect": "error",
|
|
92
|
+
"react-hooks/set-state-in-render": "error",
|
|
93
|
+
"react-hooks/static-components": "error",
|
|
94
|
+
"react-hooks/unsupported-syntax": "error",
|
|
95
|
+
"react-hooks/use-memo": "error",
|
|
81
96
|
},
|
|
82
97
|
settings: reactPluginConfig.settings,
|
|
83
98
|
},
|
|
@@ -43,6 +43,7 @@ export const config = createConfig({
|
|
|
43
43
|
"unicorn/no-document-cookie": "error",
|
|
44
44
|
"unicorn/no-empty-file": "error",
|
|
45
45
|
"unicorn/no-for-loop": "error",
|
|
46
|
+
"unicorn/no-immediate-mutation": "error",
|
|
46
47
|
"unicorn/no-instanceof-array": "error",
|
|
47
48
|
"unicorn/no-invalid-fetch-options": "error",
|
|
48
49
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
@@ -59,6 +60,7 @@ export const config = createConfig({
|
|
|
59
60
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
60
61
|
"unicorn/no-unreadable-iife": "error",
|
|
61
62
|
"unicorn/no-unused-properties": "error",
|
|
63
|
+
"unicorn/no-useless-collection-argument": "error",
|
|
62
64
|
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
63
65
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
64
66
|
"unicorn/no-useless-length-check": "error",
|
|
@@ -102,6 +104,7 @@ export const config = createConfig({
|
|
|
102
104
|
"unicorn/prefer-query-selector": "error",
|
|
103
105
|
"unicorn/prefer-reflect-apply": "error",
|
|
104
106
|
"unicorn/prefer-regexp-test": "error",
|
|
107
|
+
"unicorn/prefer-response-static-json": "error",
|
|
105
108
|
"unicorn/prefer-set-has": "error",
|
|
106
109
|
"unicorn/prefer-set-size": "error",
|
|
107
110
|
"unicorn/prefer-single-call": "error",
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { writeFile, chmod, mkdir, symlink, rm } from 'node:fs/promises';
|
|
|
5
5
|
import { existsSync, cpSync, readFileSync, renameSync, writeFileSync, readdirSync } from 'node:fs';
|
|
6
6
|
import { fdir } from 'fdir';
|
|
7
7
|
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
8
|
+
const require$1 = createRequire(import.meta.url);
|
|
9
9
|
function assert(expectedCondition, createError) {
|
|
10
10
|
if (!expectedCondition) {
|
|
11
11
|
throw createError();
|
|
@@ -100,7 +100,7 @@ const getStackCommand = (command, isNodeRuntime = true)=>{
|
|
|
100
100
|
].join(" ");
|
|
101
101
|
};
|
|
102
102
|
const hasDependency = (packageName)=>{
|
|
103
|
-
return Boolean(require.resolve(packageName));
|
|
103
|
+
return Boolean(require$1.resolve(packageName));
|
|
104
104
|
};
|
|
105
105
|
const setPackageManager = async ()=>{
|
|
106
106
|
/**
|
|
@@ -131,9 +131,11 @@ const eslint = (options)=>async (files = [])=>{
|
|
|
131
131
|
if (eslintFiles.length === 0) return;
|
|
132
132
|
}
|
|
133
133
|
const arguments_ = [
|
|
134
|
-
...eslintFiles
|
|
134
|
+
...eslintFiles,
|
|
135
|
+
"--cache",
|
|
136
|
+
`--cache-location ${resolveFromProjectDirectory("node_modules/.cache/.eslintcache")}`,
|
|
137
|
+
"--no-error-on-unmatched-pattern"
|
|
135
138
|
];
|
|
136
|
-
arguments_.push("--cache", `--cache-location ${resolveFromProjectDirectory("node_modules/.cache/.eslintcache")}`, "--no-error-on-unmatched-pattern");
|
|
137
139
|
if (options.isFixMode) {
|
|
138
140
|
arguments_.push("--fix");
|
|
139
141
|
}
|
|
@@ -195,7 +197,7 @@ const ESLINT_EXTENSIONS = [
|
|
|
195
197
|
"mdx"
|
|
196
198
|
];
|
|
197
199
|
|
|
198
|
-
var version = "2.
|
|
200
|
+
var version = "2.32.0";
|
|
199
201
|
|
|
200
202
|
const createWatchCommand = (program)=>{
|
|
201
203
|
program.command({
|
|
@@ -602,7 +604,7 @@ const checkDependency = async ()=>{
|
|
|
602
604
|
const packages = JSON.parse(stdout).map((package_)=>{
|
|
603
605
|
const packagePath = join(package_.path, "package.json");
|
|
604
606
|
assert(package_.name, ()=>createPackageError(`\`${packagePath}\` must have a name field.`));
|
|
605
|
-
const packageContent = require(packagePath);
|
|
607
|
+
const packageContent = require$1(packagePath);
|
|
606
608
|
const peerDependencies = packageContent.peerDependencies ?? {};
|
|
607
609
|
const devDependencies = packageContent.devDependencies ?? {};
|
|
608
610
|
const dependencies = packageContent.dependencies ?? {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"stack",
|
|
@@ -43,36 +43,36 @@
|
|
|
43
43
|
"@changesets/cli": "^2.29.7",
|
|
44
44
|
"@commitlint/cli": "^20.1.0",
|
|
45
45
|
"@commitlint/config-conventional": "^20.0.0",
|
|
46
|
-
"@eslint-react/eslint-plugin": "^2.
|
|
47
|
-
"@eslint/compat": "^
|
|
48
|
-
"@stylistic/eslint-plugin": "^5.
|
|
49
|
-
"@vitest/eslint-plugin": "^1.3
|
|
50
|
-
"eslint": "^9.
|
|
46
|
+
"@eslint-react/eslint-plugin": "^2.3.5",
|
|
47
|
+
"@eslint/compat": "^2.0.0",
|
|
48
|
+
"@stylistic/eslint-plugin": "^5.6.1",
|
|
49
|
+
"@vitest/eslint-plugin": "^1.4.3",
|
|
50
|
+
"eslint": "^9.39.1",
|
|
51
51
|
"eslint-config-prettier": "^10.1.8",
|
|
52
52
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
53
|
-
"eslint-plugin-depend": "^1.
|
|
53
|
+
"eslint-plugin-depend": "^1.4.0",
|
|
54
54
|
"eslint-plugin-import-x": "^4.16.1",
|
|
55
55
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
56
|
-
"eslint-plugin-jsdoc": "^
|
|
56
|
+
"eslint-plugin-jsdoc": "^61.3.0",
|
|
57
57
|
"eslint-plugin-mdx": "^3.6.2",
|
|
58
58
|
"eslint-plugin-n": "^17.23.1",
|
|
59
59
|
"eslint-plugin-prettier": "^5.5.4",
|
|
60
|
-
"eslint-plugin-react-hooks": "^
|
|
60
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
61
61
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
62
62
|
"eslint-plugin-sort-keys-custom-order": "^2.2.1",
|
|
63
|
-
"eslint-plugin-unicorn": "^
|
|
63
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
64
64
|
"fdir": "^6.5.0",
|
|
65
|
-
"globals": "^16.
|
|
65
|
+
"globals": "^16.5.0",
|
|
66
66
|
"prettier": "^3.6.2",
|
|
67
67
|
"prettier-plugin-packagejson": "^2.5.19",
|
|
68
68
|
"termost": "^1.8.0",
|
|
69
|
-
"turbo": "^2.
|
|
69
|
+
"turbo": "^2.6.1",
|
|
70
70
|
"typescript": "^5.9.3",
|
|
71
|
-
"typescript-eslint": "^8.
|
|
71
|
+
"typescript-eslint": "^8.47.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@types/node": "
|
|
75
|
-
"quickbundle": "2.
|
|
74
|
+
"@types/node": "24.10.1",
|
|
75
|
+
"quickbundle": "2.15.0"
|
|
76
76
|
},
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public",
|
|
@@ -18,15 +18,11 @@ jobs:
|
|
|
18
18
|
contents: write
|
|
19
19
|
pull-requests: write
|
|
20
20
|
steps:
|
|
21
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v5
|
|
22
22
|
- uses: pnpm/action-setup@v4
|
|
23
|
-
-
|
|
24
|
-
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
25
|
-
id: node
|
|
26
|
-
- name: Setup node ${{ steps.node.outputs.version }}
|
|
27
|
-
uses: actions/setup-node@v4
|
|
23
|
+
- uses: actions/setup-node@v6
|
|
28
24
|
with:
|
|
29
|
-
node-version:
|
|
25
|
+
node-version-file: ".nvmrc"
|
|
30
26
|
cache: pnpm
|
|
31
27
|
- name: Setup .npmrc
|
|
32
28
|
run: |
|
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
if: github.actor == 'renovate[bot]'
|
|
13
13
|
steps:
|
|
14
14
|
- name: Checkout
|
|
15
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v5
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 2
|
|
18
18
|
ref: ${{ github.head_ref }}
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
git config --global user.email adbayb@gmail.com
|
|
22
22
|
git config --global user.name 'Ayoub Adib'
|
|
23
23
|
- name: Create changelog entry
|
|
24
|
-
uses: actions/github-script@
|
|
24
|
+
uses: actions/github-script@v8
|
|
25
25
|
# Credits to https://github.com/backstage/backstage/blob/bcc11651add5a2589898dfb9d665ebb9d412201b/.github/workflows/sync_renovate-changesets.yml
|
|
26
26
|
with:
|
|
27
27
|
script: |
|
|
@@ -9,15 +9,11 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
11
|
- name: Checkout the code
|
|
12
|
-
uses: actions/checkout@
|
|
12
|
+
uses: actions/checkout@v5
|
|
13
13
|
- uses: pnpm/action-setup@v4
|
|
14
|
-
-
|
|
15
|
-
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
16
|
-
id: node
|
|
17
|
-
- name: Setup node ${{ steps.node.outputs.version }}
|
|
18
|
-
uses: actions/setup-node@v4
|
|
14
|
+
- uses: actions/setup-node@v6
|
|
19
15
|
with:
|
|
20
|
-
node-version:
|
|
16
|
+
node-version-file: ".nvmrc"
|
|
21
17
|
cache: pnpm
|
|
22
18
|
- name: Setup cache
|
|
23
19
|
id: cache
|
|
@@ -18,15 +18,11 @@ jobs:
|
|
|
18
18
|
contents: write
|
|
19
19
|
pull-requests: write
|
|
20
20
|
steps:
|
|
21
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v5
|
|
22
22
|
- uses: pnpm/action-setup@v4
|
|
23
|
-
-
|
|
24
|
-
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
25
|
-
id: node
|
|
26
|
-
- name: Setup node ${{ steps.node.outputs.version }}
|
|
27
|
-
uses: actions/setup-node@v4
|
|
23
|
+
- uses: actions/setup-node@v6
|
|
28
24
|
with:
|
|
29
|
-
node-version:
|
|
25
|
+
node-version-file: ".nvmrc"
|
|
30
26
|
cache: pnpm
|
|
31
27
|
- name: Setup .npmrc
|
|
32
28
|
run: |
|
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
if: github.actor == 'renovate[bot]'
|
|
13
13
|
steps:
|
|
14
14
|
- name: Checkout
|
|
15
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v5
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 2
|
|
18
18
|
ref: ${{ github.head_ref }}
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
git config --global user.email adbayb@gmail.com
|
|
22
22
|
git config --global user.name 'Ayoub Adib'
|
|
23
23
|
- name: Create changelog entry
|
|
24
|
-
uses: actions/github-script@
|
|
24
|
+
uses: actions/github-script@v8
|
|
25
25
|
# Credits to https://github.com/backstage/backstage/blob/bcc11651add5a2589898dfb9d665ebb9d412201b/.github/workflows/sync_renovate-changesets.yml
|
|
26
26
|
with:
|
|
27
27
|
script: |
|
|
@@ -9,15 +9,11 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
11
|
- name: Checkout the code
|
|
12
|
-
uses: actions/checkout@
|
|
12
|
+
uses: actions/checkout@v5
|
|
13
13
|
- uses: pnpm/action-setup@v4
|
|
14
|
-
-
|
|
15
|
-
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
16
|
-
id: node
|
|
17
|
-
- name: Setup node ${{ steps.node.outputs.version }}
|
|
18
|
-
uses: actions/setup-node@v4
|
|
14
|
+
- uses: actions/setup-node@v6
|
|
19
15
|
with:
|
|
20
|
-
node-version:
|
|
16
|
+
node-version-file: ".nvmrc"
|
|
21
17
|
cache: pnpm
|
|
22
18
|
- name: Setup cache
|
|
23
19
|
id: cache
|