@adbayb/stack 1.16.0 → 2.0.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/README.md +36 -41
- package/bin/index.js +8 -0
- package/configs/eslint/README.md +39 -0
- package/configs/eslint/constants.js +10 -0
- package/configs/eslint/helpers.js +6 -0
- package/configs/eslint/index.js +29 -0
- package/configs/eslint/presets/base.js +26 -0
- package/configs/eslint/presets/eslint.js +105 -0
- package/configs/eslint/presets/import.js +71 -0
- package/configs/eslint/presets/jsdoc.js +79 -0
- package/configs/eslint/presets/node.js +51 -0
- package/configs/eslint/presets/overridable.js +33 -0
- package/configs/eslint/presets/react.js +75 -0
- package/configs/eslint/presets/sonar.js +225 -0
- package/configs/eslint/presets/stylistic.js +69 -0
- package/configs/eslint/presets/test.js +59 -0
- package/configs/eslint/presets/typescript.js +172 -0
- package/configs/eslint/presets/uncategorized.js +34 -0
- package/configs/prettier/README.md +65 -0
- package/configs/prettier/index.js +25 -0
- package/configs/typescript/README.md +46 -0
- package/configs/typescript/index.json +35 -0
- package/dist/index.js +761 -0
- package/package.json +48 -18
- package/{template → templates/multi-projects}/.editorconfig +1 -1
- package/templates/multi-projects/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/templates/multi-projects/.github/workflows/continuous_delivery.yml +61 -0
- package/templates/multi-projects/.github/workflows/continuous_integration.yml +9 -0
- package/templates/multi-projects/.github/workflows/conventional_commit.yml +48 -0
- package/templates/multi-projects/.github/workflows/dependency_changelog.yml +117 -0
- package/templates/multi-projects/.github/workflows/workflow.yml +39 -0
- package/templates/multi-projects/.gitignore.tmpl +134 -0
- package/templates/multi-projects/.npmrc.tmpl +8 -0
- package/templates/multi-projects/applications/README.md +6 -0
- package/templates/multi-projects/eslint.config.js.tmpl +1 -0
- package/templates/multi-projects/examples/README.md +6 -0
- package/{template → templates/multi-projects}/examples/default/package.json.tmpl +2 -2
- package/templates/multi-projects/libraries/README.md +3 -0
- package/templates/multi-projects/libraries/{{projectName}}/package.json.tmpl +39 -0
- package/templates/multi-projects/libraries/{{projectName}}/tsconfig.json +5 -0
- package/{template → templates/multi-projects}/package.json.tmpl +4 -3
- package/{template → templates/multi-projects}/pnpm-workspace.yaml.tmpl +0 -1
- package/{template → templates/multi-projects}/tools/README.md +1 -1
- package/templates/multi-projects/tsconfig.json +4 -0
- package/{template → templates/multi-projects}/turbo.json +2 -1
- package/templates/single-project/.changeset/README.md +8 -0
- package/templates/single-project/.changeset/config.json.tmpl +13 -0
- package/templates/single-project/.changeset/welcome.md.tmpl +5 -0
- package/templates/single-project/.editorconfig +4 -0
- package/templates/single-project/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- package/templates/single-project/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/templates/single-project/.github/PULL_REQUEST_TEMPLATE.md.tmpl +29 -0
- package/templates/single-project/.github/renovate.json +69 -0
- package/templates/single-project/.github/workflows/continuous_delivery.yml +61 -0
- package/templates/single-project/.github/workflows/continuous_integration.yml +9 -0
- package/templates/single-project/.github/workflows/conventional_commit.yml +48 -0
- package/templates/single-project/.github/workflows/dependency_changelog.yml +117 -0
- package/templates/single-project/.github/workflows/workflow.yml +39 -0
- package/templates/single-project/.gitignore.tmpl +134 -0
- package/templates/single-project/.npmrc.tmpl +8 -0
- package/templates/single-project/.nvmrc.tmpl +1 -0
- package/templates/single-project/.vscode/extensions.json +8 -0
- package/templates/single-project/.vscode/settings.json +27 -0
- package/templates/single-project/CONTRIBUTING.md.tmpl +21 -0
- package/templates/single-project/LICENSE.tmpl +21 -0
- package/templates/single-project/eslint.config.js.tmpl +1 -0
- package/templates/single-project/examples/README.md +6 -0
- package/templates/single-project/examples/default/package.json.tmpl +14 -0
- package/templates/single-project/examples/default/src/index.ts.tmpl +3 -0
- package/templates/single-project/examples/default/tsconfig.json +5 -0
- package/templates/single-project/package.json.tmpl +27 -0
- package/templates/single-project/pnpm-workspace.yaml.tmpl +4 -0
- package/templates/single-project/tools/README.md +6 -0
- package/templates/single-project/tsconfig.json +4 -0
- package/templates/single-project/turbo.json +25 -0
- package/templates/single-project/{{projectName}}/README.md.tmpl +42 -0
- package/{template → templates/single-project}/{{projectName}}/package.json.tmpl +3 -5
- package/templates/single-project/{{projectName}}/src/index.test.ts.tmpl +5 -0
- package/templates/single-project/{{projectName}}/src/index.ts +1 -0
- package/bin/index.cjs +0 -7
- package/dist/index.cjs +0 -15
- package/dist/index.cjs.map +0 -7
- package/template/.commitlintrc.json +0 -3
- package/template/.eslintrc.json.tmpl +0 -3
- package/template/.github/ISSUE_TEMPLATE/config.yml +0 -4
- package/template/.github/workflows/continuous_delivery.yml +0 -49
- package/template/.github/workflows/continuous_integration.yml +0 -9
- package/template/.github/workflows/conventional_commit.yml +0 -48
- package/template/.github/workflows/dependency_changelog.yml +0 -117
- package/template/.github/workflows/workflow.yml +0 -96
- package/template/applications/README.md +0 -9
- package/template/examples/README.md +0 -6
- package/template/libraries/README.md +0 -9
- package/template/tsconfig.json +0 -3
- /package/{template → templates/multi-projects}/.changeset/README.md +0 -0
- /package/{template → templates/multi-projects}/.changeset/config.json.tmpl +0 -0
- /package/{template → templates/multi-projects}/.changeset/welcome.md.tmpl +0 -0
- /package/{template → templates/multi-projects}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- /package/{template → templates/multi-projects}/.github/PULL_REQUEST_TEMPLATE.md.tmpl +0 -0
- /package/{template → templates/multi-projects}/.github/renovate.json +0 -0
- /package/{template → templates/multi-projects}/.nvmrc.tmpl +0 -0
- /package/{template → templates/multi-projects}/.vscode/extensions.json +0 -0
- /package/{template → templates/multi-projects}/.vscode/settings.json +0 -0
- /package/{template → templates/multi-projects}/CONTRIBUTING.md.tmpl +0 -0
- /package/{template → templates/multi-projects}/LICENSE.tmpl +0 -0
- /package/{template → templates/multi-projects}/examples/default/src/index.ts.tmpl +0 -0
- /package/{template → templates/multi-projects}/examples/default/tsconfig.json +0 -0
- /package/{template → templates/multi-projects/libraries}/{{projectName}}/README.md.tmpl +0 -0
- /package/{template → templates/multi-projects/libraries}/{{projectName}}/src/index.test.ts.tmpl +0 -0
- /package/{template → templates/multi-projects/libraries}/{{projectName}}/src/index.ts +0 -0
- /package/{template → templates/single-project}/{{projectName}}/tsconfig.json +0 -0
package/package.json
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "My opinionated toolchain",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin",
|
|
10
|
+
"configs",
|
|
10
11
|
"dist",
|
|
11
|
-
"
|
|
12
|
+
"templates"
|
|
12
13
|
],
|
|
13
14
|
"bin": {
|
|
14
|
-
"stack": "bin/index.
|
|
15
|
+
"stack": "./bin/index.js"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"source": "./src/index.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./eslint": "./configs/eslint/index.js",
|
|
24
|
+
"./prettier": "./configs/prettier/index.js",
|
|
25
|
+
"./typescript": "./configs/typescript/index.json"
|
|
15
26
|
},
|
|
16
|
-
"source": "src/index.ts",
|
|
17
|
-
"main": "dist/index.cjs",
|
|
18
|
-
"platform": "node",
|
|
19
27
|
"keywords": [
|
|
20
28
|
"stack",
|
|
21
29
|
"scripts",
|
|
@@ -30,24 +38,46 @@
|
|
|
30
38
|
"repository": {
|
|
31
39
|
"type": "git",
|
|
32
40
|
"url": "https://github.com/adbayb/stack.git",
|
|
33
|
-
"directory": "stack"
|
|
41
|
+
"directory": "applications/stack"
|
|
34
42
|
},
|
|
35
43
|
"license": "MIT",
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "22.8.7",
|
|
46
|
+
"quickbundle": "2.6.0"
|
|
47
|
+
},
|
|
36
48
|
"dependencies": {
|
|
37
49
|
"@changesets/changelog-github": "^0.5.0",
|
|
38
|
-
"@changesets/cli": "^2.27.
|
|
39
|
-
"@commitlint/cli": "^
|
|
40
|
-
"@commitlint/config-conventional": "^
|
|
41
|
-
"eslint": "^
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"typescript": "^
|
|
50
|
+
"@changesets/cli": "^2.27.9",
|
|
51
|
+
"@commitlint/cli": "^19.5.0",
|
|
52
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
53
|
+
"@eslint/compat": "^1.2.2",
|
|
54
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
55
|
+
"@stylistic/eslint-plugin": "^2.10.1",
|
|
56
|
+
"@vitest/eslint-plugin": "^1.1.7",
|
|
57
|
+
"eslint-config-prettier": "^9.1.0",
|
|
58
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
59
|
+
"eslint-plugin-import-x": "^4.4.0",
|
|
60
|
+
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
61
|
+
"eslint-plugin-jsdoc": "^50.4.3",
|
|
62
|
+
"eslint-plugin-mdx": "^3.1.5",
|
|
63
|
+
"eslint-plugin-n": "^17.12.0",
|
|
64
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
65
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
66
|
+
"eslint-plugin-react": "^7.37.2",
|
|
67
|
+
"eslint-plugin-sonarjs": "^2.0.4",
|
|
68
|
+
"eslint-plugin-sort-keys-custom-order": "^2.2.0",
|
|
69
|
+
"eslint": "^9.14.0",
|
|
70
|
+
"fdir": "^6.4.2",
|
|
71
|
+
"globals": "^15.11.0",
|
|
72
|
+
"prettier": "^3.3.3",
|
|
73
|
+
"termost": "^0.18.0",
|
|
74
|
+
"turbo": "^2.2.3",
|
|
75
|
+
"typescript-eslint": "^8.12.2",
|
|
76
|
+
"typescript": "^5.6.3"
|
|
47
77
|
},
|
|
48
78
|
"scripts": {
|
|
49
79
|
"prestart": "pnpm build",
|
|
50
|
-
"start": "bin/index.js",
|
|
80
|
+
"start": "./bin/index.js",
|
|
51
81
|
"build": "quickbundle build",
|
|
52
82
|
"watch": "quickbundle watch"
|
|
53
83
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Continous delivery
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
integrate:
|
|
12
|
+
uses: ./.github/workflows/workflow.yml
|
|
13
|
+
release:
|
|
14
|
+
timeout-minutes: 5
|
|
15
|
+
needs: integrate
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: pnpm/action-setup@v4
|
|
23
|
+
- name: Get node version
|
|
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
|
|
28
|
+
with:
|
|
29
|
+
node-version: ${{ steps.node.outputs.version }}
|
|
30
|
+
cache: pnpm
|
|
31
|
+
- name: Setup .npmrc
|
|
32
|
+
run: |
|
|
33
|
+
cat << EOF > "$HOME/.npmrc"
|
|
34
|
+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
35
|
+
EOF
|
|
36
|
+
env:
|
|
37
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: pnpm install --frozen-lockfile
|
|
40
|
+
- name: Publish pre-release version(s)
|
|
41
|
+
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
|
|
42
|
+
run: |
|
|
43
|
+
pnpm --filter=\!@examples/\* --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
|
|
44
|
+
pnpm --filter=\!@examples/\* --recursive exec pnpm publish --tag next --no-git-checks
|
|
45
|
+
- name: Create release pull request
|
|
46
|
+
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
|
|
47
|
+
uses: changesets/action@v1
|
|
48
|
+
with:
|
|
49
|
+
commit: "chore: release package(s)"
|
|
50
|
+
title: "chore: release package(s)"
|
|
51
|
+
env:
|
|
52
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
53
|
+
- name: Publish stable version(s)
|
|
54
|
+
if: "contains(github.event.head_commit.message, 'chore: release package(s)')"
|
|
55
|
+
uses: changesets/action@v1
|
|
56
|
+
with:
|
|
57
|
+
version: pnpm release:version
|
|
58
|
+
publish: pnpm release:publish
|
|
59
|
+
env:
|
|
60
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Conventional commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, edited]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
main:
|
|
9
|
+
timeout-minutes: 5
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: amannn/action-semantic-pull-request@v5
|
|
13
|
+
id: check_pr_rule
|
|
14
|
+
env:
|
|
15
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
16
|
+
with:
|
|
17
|
+
types: |
|
|
18
|
+
build
|
|
19
|
+
chore
|
|
20
|
+
ci
|
|
21
|
+
docs
|
|
22
|
+
feat
|
|
23
|
+
fix
|
|
24
|
+
perf
|
|
25
|
+
refactor
|
|
26
|
+
revert
|
|
27
|
+
style
|
|
28
|
+
test
|
|
29
|
+
requireScope: false
|
|
30
|
+
subjectPattern: ^(?![A-Z]).+$
|
|
31
|
+
subjectPatternError: The subject must start with a lowercase character
|
|
32
|
+
# Create a sticky comment to display the detailed error
|
|
33
|
+
- uses: marocchino/sticky-pull-request-comment@v2
|
|
34
|
+
if: always() && (steps.check_pr_rule.outputs.error_message != null)
|
|
35
|
+
with:
|
|
36
|
+
header: check_pr_comment
|
|
37
|
+
message: |
|
|
38
|
+
Pull request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/).
|
|
39
|
+
Please adjust your title following:
|
|
40
|
+
```
|
|
41
|
+
${{ steps.check_pr_rule.outputs.error_message }}
|
|
42
|
+
```
|
|
43
|
+
# Delete a previous comment when the issue has been resolved
|
|
44
|
+
- if: ${{ steps.check_pr_rule.outputs.error_message == null }}
|
|
45
|
+
uses: marocchino/sticky-pull-request-comment@v2
|
|
46
|
+
with:
|
|
47
|
+
header: check_pr_comment
|
|
48
|
+
delete: true
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: Dependency changelog
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
paths:
|
|
6
|
+
- "**/pnpm-lock.yaml"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
main:
|
|
10
|
+
timeout-minutes: 5
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
if: github.actor == 'renovate[bot]'
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 2
|
|
18
|
+
ref: ${{ github.head_ref }}
|
|
19
|
+
- name: Configure Git
|
|
20
|
+
run: |
|
|
21
|
+
git config --global user.email adbayb@gmail.com
|
|
22
|
+
git config --global user.name 'Ayoub Adib'
|
|
23
|
+
- name: Create changelog entry
|
|
24
|
+
uses: actions/github-script@v7
|
|
25
|
+
# Credits to https://github.com/backstage/backstage/blob/bcc11651add5a2589898dfb9d665ebb9d412201b/.github/workflows/sync_renovate-changesets.yml
|
|
26
|
+
with:
|
|
27
|
+
script: |
|
|
28
|
+
const { promises: fs } = require("fs");
|
|
29
|
+
|
|
30
|
+
async function getPackagesNames(files) {
|
|
31
|
+
const names = [];
|
|
32
|
+
|
|
33
|
+
for (const file of files) {
|
|
34
|
+
const data = JSON.parse(await fs.readFile(file, "utf8"));
|
|
35
|
+
|
|
36
|
+
if (!data.private) {
|
|
37
|
+
names.push(data.name);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return names;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function createChangeset(fileName, packageBumps, packages) {
|
|
45
|
+
let message = "";
|
|
46
|
+
|
|
47
|
+
for (const [pkg, bump] of packageBumps) {
|
|
48
|
+
message = message + `Updated dependency \`${pkg}\` to \`${bump}\`.\n`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const pkgs = packages.map((pkg) => `"${pkg}": minor`).join("\n");
|
|
52
|
+
const body = `---\n${pkgs}\n---\n\n${message.trim()}\n`;
|
|
53
|
+
|
|
54
|
+
await fs.writeFile(fileName, body);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function getBumps(files) {
|
|
58
|
+
const bumps = new Map();
|
|
59
|
+
|
|
60
|
+
for (const file of files) {
|
|
61
|
+
const { stdout: changes } = await exec.getExecOutput("git", [
|
|
62
|
+
"show",
|
|
63
|
+
file,
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
for (const change of changes.split("\n")) {
|
|
67
|
+
if (!change.match(/^\+\s/)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const match = change.match(/"(.*?)"/g);
|
|
72
|
+
|
|
73
|
+
bumps.set(match[0].replace(/"/g, ""), match[1].replace(/"/g, ""));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return bumps;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const branch = await exec.getExecOutput("git branch --show-current");
|
|
81
|
+
|
|
82
|
+
if (!branch.stdout.startsWith("renovate/")) {
|
|
83
|
+
console.log("Not a renovate branch, skipping");
|
|
84
|
+
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const diffOutput = await exec.getExecOutput("git diff --name-only HEAD~1");
|
|
89
|
+
const diffFiles = diffOutput.stdout.split("\n");
|
|
90
|
+
|
|
91
|
+
if (diffFiles.find((f) => f.startsWith(".changeset"))) {
|
|
92
|
+
console.log("Changeset already exists, skipping");
|
|
93
|
+
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const files = diffFiles
|
|
98
|
+
.filter((file) => file !== "package.json") // skip root package.json
|
|
99
|
+
.filter((file) => file.includes("package.json"));
|
|
100
|
+
const packageNames = await getPackagesNames(files);
|
|
101
|
+
|
|
102
|
+
if (!packageNames.length) {
|
|
103
|
+
console.log("No package.json changes to published packages, skipping");
|
|
104
|
+
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const { stdout: shortHash } = await exec.getExecOutput(
|
|
109
|
+
"git rev-parse --short HEAD"
|
|
110
|
+
);
|
|
111
|
+
const fileName = `.changeset/renovate-${shortHash.trim()}.md`;
|
|
112
|
+
const packageBumps = await getBumps(files);
|
|
113
|
+
|
|
114
|
+
await createChangeset(fileName, packageBumps, packageNames);
|
|
115
|
+
await exec.exec("git", ["add", fileName]);
|
|
116
|
+
await exec.exec("git commit -C HEAD --amend --no-edit");
|
|
117
|
+
await exec.exec("git push --force");
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Main shareable workflow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
main:
|
|
8
|
+
timeout-minutes: 5
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Checkout the code
|
|
12
|
+
uses: actions/checkout@v4
|
|
13
|
+
- uses: pnpm/action-setup@v4
|
|
14
|
+
- name: Get node version
|
|
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
|
|
19
|
+
with:
|
|
20
|
+
node-version: ${{ steps.node.outputs.version }}
|
|
21
|
+
cache: pnpm
|
|
22
|
+
- name: Setup cache
|
|
23
|
+
id: cache
|
|
24
|
+
uses: actions/cache@v4
|
|
25
|
+
with:
|
|
26
|
+
path: |
|
|
27
|
+
./node_modules
|
|
28
|
+
./turbo
|
|
29
|
+
key: ${{ runner.os }}-cache-${{ github.sha }}
|
|
30
|
+
restore-keys: |
|
|
31
|
+
${{ runner.os }}-cache-
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: pnpm install --frozen-lockfile
|
|
34
|
+
- name: Build
|
|
35
|
+
run: pnpm build
|
|
36
|
+
- name: Check (static analysis including linters, types, and commit message)
|
|
37
|
+
run: pnpm check
|
|
38
|
+
- name: Test
|
|
39
|
+
run: pnpm test
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
lerna-debug.log*
|
|
8
|
+
.pnpm-debug.log*
|
|
9
|
+
|
|
10
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
+
|
|
13
|
+
# Runtime data
|
|
14
|
+
pids
|
|
15
|
+
*.pid
|
|
16
|
+
*.seed
|
|
17
|
+
*.pid.lock
|
|
18
|
+
|
|
19
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
20
|
+
lib-cov
|
|
21
|
+
|
|
22
|
+
# Coverage directory used by tools like istanbul
|
|
23
|
+
coverage
|
|
24
|
+
*.lcov
|
|
25
|
+
|
|
26
|
+
# nyc test coverage
|
|
27
|
+
.nyc_output
|
|
28
|
+
|
|
29
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
30
|
+
.grunt
|
|
31
|
+
|
|
32
|
+
# Bower dependency directory (https://bower.io/)
|
|
33
|
+
bower_components
|
|
34
|
+
|
|
35
|
+
# node-waf configuration
|
|
36
|
+
.lock-wscript
|
|
37
|
+
|
|
38
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
39
|
+
build/Release
|
|
40
|
+
|
|
41
|
+
# Dependency directories
|
|
42
|
+
node_modules/
|
|
43
|
+
jspm_packages/
|
|
44
|
+
|
|
45
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
46
|
+
web_modules/
|
|
47
|
+
|
|
48
|
+
# TypeScript cache
|
|
49
|
+
*.tsbuildinfo
|
|
50
|
+
|
|
51
|
+
# Optional npm cache directory
|
|
52
|
+
.npm
|
|
53
|
+
|
|
54
|
+
# Optional eslint cache
|
|
55
|
+
.eslintcache
|
|
56
|
+
|
|
57
|
+
# Optional stylelint cache
|
|
58
|
+
.stylelintcache
|
|
59
|
+
|
|
60
|
+
# Microbundle cache
|
|
61
|
+
.rpt2_cache/
|
|
62
|
+
.rts2_cache_cjs/
|
|
63
|
+
.rts2_cache_es/
|
|
64
|
+
.rts2_cache_umd/
|
|
65
|
+
|
|
66
|
+
# Optional REPL history
|
|
67
|
+
.node_repl_history
|
|
68
|
+
|
|
69
|
+
# Output of 'npm pack'
|
|
70
|
+
*.tgz
|
|
71
|
+
|
|
72
|
+
# Yarn Integrity file
|
|
73
|
+
.yarn-integrity
|
|
74
|
+
|
|
75
|
+
# dotenv environment variable files
|
|
76
|
+
.env
|
|
77
|
+
.env.development.local
|
|
78
|
+
.env.test.local
|
|
79
|
+
.env.production.local
|
|
80
|
+
.env.local
|
|
81
|
+
|
|
82
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
83
|
+
.cache
|
|
84
|
+
.parcel-cache
|
|
85
|
+
|
|
86
|
+
# Next.js build output
|
|
87
|
+
.next
|
|
88
|
+
out
|
|
89
|
+
|
|
90
|
+
# Nuxt.js build / generate output
|
|
91
|
+
.nuxt
|
|
92
|
+
dist
|
|
93
|
+
|
|
94
|
+
# Gatsby files
|
|
95
|
+
.cache/
|
|
96
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
97
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
98
|
+
# public
|
|
99
|
+
|
|
100
|
+
# vuepress build output
|
|
101
|
+
.vuepress/dist
|
|
102
|
+
|
|
103
|
+
# vuepress v2.x temp and cache directory
|
|
104
|
+
.temp
|
|
105
|
+
.cache
|
|
106
|
+
|
|
107
|
+
# Docusaurus cache and generated files
|
|
108
|
+
.docusaurus
|
|
109
|
+
|
|
110
|
+
# Serverless directories
|
|
111
|
+
.serverless/
|
|
112
|
+
|
|
113
|
+
# FuseBox cache
|
|
114
|
+
.fusebox/
|
|
115
|
+
|
|
116
|
+
# DynamoDB Local files
|
|
117
|
+
.dynamodb/
|
|
118
|
+
|
|
119
|
+
# TernJS port file
|
|
120
|
+
.tern-port
|
|
121
|
+
|
|
122
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
123
|
+
.vscode-test
|
|
124
|
+
|
|
125
|
+
# yarn v2
|
|
126
|
+
.yarn/cache
|
|
127
|
+
.yarn/unplugged
|
|
128
|
+
.yarn/build-state.yml
|
|
129
|
+
.yarn/install-state.gz
|
|
130
|
+
.pnp.*
|
|
131
|
+
|
|
132
|
+
# Others
|
|
133
|
+
.DS_Store
|
|
134
|
+
.turbo
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@adbayb/stack/eslint";
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"name": "@examples/default",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"start": "
|
|
6
|
+
"start": "tsx ./src/index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"{{projectName}}": "workspace:^"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"
|
|
12
|
+
"tsx": "4.19.1"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Libraries
|
|
2
|
+
|
|
3
|
+
A collection of internal and/or publishable libraries (referred to as packages in the Node ecosystem) that are leveraged during software development to implement/share a specific aspect/functionality. A library generally encapsulates highly cohesive modules together.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"description": "{{projectDescription}}",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"source": "./src/index.ts",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"default": "./dist/index.mjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Ayoub Adib <adbayb@gmail.com> (https://twitter.com/adbayb)",
|
|
24
|
+
"bugs": "https://github.com/{{repoId}}/issues",
|
|
25
|
+
"homepage": "https://github.com/{{repoId}}/tree/main/{{projectName}}#readme",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "{{projectUrl}}",
|
|
29
|
+
"directory": "libraries/{{projectName}}"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepublishOnly": "pnpm build",
|
|
33
|
+
"clean": "rm -rf dist",
|
|
34
|
+
"start": "pnpm watch",
|
|
35
|
+
"build": "pnpm clean && quickbundle build",
|
|
36
|
+
"watch": "quickbundle watch",
|
|
37
|
+
"test": "vitest"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "root",
|
|
2
3
|
"private": true,
|
|
3
4
|
"version": "0.0.0",
|
|
4
5
|
"type": "module",
|
|
@@ -15,11 +16,11 @@
|
|
|
15
16
|
"release:version": "stack release --tag",
|
|
16
17
|
"release:publish": "stack release --publish"
|
|
17
18
|
},
|
|
18
|
-
"prettier": "@adbayb/prettier
|
|
19
|
+
"prettier": "@adbayb/stack/prettier",
|
|
19
20
|
"packageManager": "pnpm@{{npmVersion}}",
|
|
20
21
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
22
|
-
"pnpm": ">=
|
|
22
|
+
"node": ">=22.0.0",
|
|
23
|
+
"pnpm": ">=9.0.0",
|
|
23
24
|
"npm": "please-use-pnpm",
|
|
24
25
|
"yarn": "please-use-pnpm"
|
|
25
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tools
|
|
2
2
|
|
|
3
3
|
> [!note]
|
|
4
|
-
> Optional folder that can be removed if no internal scripts or packages for development purposes
|
|
4
|
+
> Optional folder that can be removed if no internal scripts or packages for development purposes.
|
|
5
5
|
|
|
6
6
|
A collection of internal packages and scripts that act locally on the repository codebase.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|