Skip to content

Commit 841d691

Browse files
ci: more cleanup (#101)
* ci: more cleanup * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 68676fe commit 841d691

File tree

9 files changed

+525
-660
lines changed

9 files changed

+525
-660
lines changed

.github/workflows/pr.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ concurrency:
66
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
77
cancel-in-progress: true
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
name: Test
@@ -15,25 +18,9 @@ jobs:
1518
uses: actions/checkout@v5.0.0
1619
with:
1720
fetch-depth: 0
18-
- name: Install pnpm
19-
uses: pnpm/action-setup@v4
20-
21-
- name: Get pnpm store directory
22-
id: pnpm-cache
23-
shell: bash
24-
run: |
25-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
26-
27-
- uses: actions/cache@v3
28-
name: Setup pnpm cache
29-
with:
30-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
31-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
32-
restore-keys: |
33-
${{ runner.os }}-pnpm-store-
34-
35-
- name: Build & Test
36-
run: |
37-
pnpm install --no-frozen-lockfile
38-
pnpm build
39-
pnpm test:ci
21+
- name: Setup Tools
22+
uses: tanstack/config/.github/setup@main
23+
- name: Run Build
24+
run: pnpm run build
25+
- name: Run Tests
26+
run: pnpm -r test:types && pnpm -r test:lib

.github/workflows/release.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ concurrency:
88
group: publish-${{ github.github.base_ref }}
99
cancel-in-progress: true
1010

11+
permissions:
12+
contents: write
13+
id-token: write
14+
pull-requests: write
15+
1116
jobs:
1217
release:
1318
name: Release
@@ -18,24 +23,12 @@ jobs:
1823
uses: actions/checkout@v5.0.0
1924
with:
2025
fetch-depth: 0
21-
- name: Install pnpm
22-
uses: pnpm/action-setup@v4
23-
24-
- name: Get pnpm store directory
25-
id: pnpm-cache
26-
shell: bash
27-
run: |
28-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
29-
env:
30-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31-
32-
- uses: actions/cache@v3
33-
name: Setup pnpm cache
34-
with:
35-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
36-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
37-
restore-keys: |
38-
${{ runner.os }}-pnpm-store-
26+
- name: Setup Tools
27+
uses: tanstack/config/.github/setup@main
28+
- name: Run Build
29+
run: pnpm run build
30+
- name: Run Tests
31+
run: pnpm -r test:types && pnpm -r test:lib
3932
- name: Publish
4033
run: |
4134
pnpm install --no-frozen-lockfile

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
provenance=true

babel.config.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,7 @@ module.exports = {
1717
'@babel/react',
1818
'@babel/preset-typescript',
1919
],
20-
plugins: [
21-
// 'babel-plugin-transform-async-to-promises',
22-
cjs && ['@babel/transform-modules-commonjs', { loose }],
23-
// [
24-
// '@babel/transform-runtime',
25-
// {
26-
// useESModules: !cjs,
27-
// version: require('./package.json').devDependencies[
28-
// '@babel/runtime'
29-
// ].replace(/^[^0-9]*/, ''),
30-
// },
31-
// ],
32-
].filter(Boolean),
20+
plugins: [cjs && ['@babel/transform-modules-commonjs', { loose }]].filter(
21+
Boolean,
22+
),
3323
}

package.json

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@
77
},
88
"packageManager": "pnpm@10.24.0",
99
"scripts": {
10-
"clean-dist": "pnpm -rc --parallel exec 'rm -rf build dist'",
11-
"clean-all": "pnpm -rc --parallel exec 'rm -rf build dist node_modules'",
12-
"test": "pnpm run test:ci",
13-
"test:ci": "pnpm run test:lib && pnpm run test:types",
14-
"test:types": "tsc -b",
15-
"test:lib": "vitest run",
16-
"test:lib:dev": "vitest watch",
10+
"clean": "pnpm --filter \"./packages/**\" run clean",
11+
"test:types": "pnpm -r test:types",
12+
"test:lib": "pnpm -r test:lib",
1713
"test:docs": "ts-node scripts/verify-links.ts",
1814
"build": "rollup --config rollup.config.js",
1915
"watch": "concurrently --kill-others \"rollup --config rollup.config.js -w\" \"tsc -b --watch\"",
@@ -23,59 +19,40 @@
2319
"cipublish": "ts-node scripts/publish.ts",
2420
"cipublishforce": "CI=true pnpm cipublish"
2521
},
26-
"pnpm": {
27-
"overrides": {
28-
"@tanstack/ranger": "workspace:*",
29-
"@tanstack/react-ranger": "workspace:*"
30-
}
31-
},
3222
"devDependencies": {
3323
"@babel/core": "^7.17.9",
3424
"@babel/preset-env": "^7.16.11",
3525
"@babel/preset-react": "^7.16.7",
3626
"@babel/preset-typescript": "^7.16.7",
3727
"@commitlint/parse": "^16.2.1",
38-
"@faker-js/faker": "^6.3.1",
3928
"@rollup/plugin-babel": "^5.3.1",
4029
"@rollup/plugin-commonjs": "^23.0.4",
4130
"@rollup/plugin-node-resolve": "^13.2.1",
4231
"@rollup/plugin-replace": "^4.0.0",
43-
"@testing-library/react": "^12.1.2",
44-
"@testing-library/react-hooks": "^7.0.2",
45-
"@tsconfig/svelte": "^3.0.0",
4632
"@types/babel__core": "^7.1.20",
4733
"@types/fs-extra": "^9.0.13",
4834
"@types/luxon": "^2.3.1",
4935
"@types/node": "^17.0.25",
50-
"@types/react": "^18.0.26",
51-
"@types/react-dom": "^18.0.9",
5236
"@types/semver": "^7.3.13",
5337
"axios": "^0.26.1",
54-
"babel-plugin-transform-async-to-promises": "^0.8.18",
5538
"concurrently": "^7.1.0",
5639
"current-git-branch": "^1.1.0",
5740
"fs-extra": "^10.1.0",
58-
"is-ci-cli": "^2.2.0",
5941
"git-log-parser": "^1.2.0",
42+
"knip": "^5.71.0",
6043
"luxon": "^2.3.2",
6144
"markdown-link-extractor": "^4.0.3",
45+
"premove": "^4.0.0",
6246
"prettier": "^3.7.4",
63-
"react": "^18.2.0",
64-
"react-dom": "^18.2.0",
6547
"rollup": "^2.70.2",
6648
"rollup-plugin-dts": "^4.2.2",
6749
"rollup-plugin-size": "^0.2.2",
68-
"rollup-plugin-svelte": "^7.1.0",
6950
"rollup-plugin-terser": "^7.0.2",
7051
"rollup-plugin-visualizer": "^5.6.0",
71-
"solid-js": "^1.6.5",
7252
"stream-to-array": "^2.3.0",
73-
"svelte": "^3.55.0",
7453
"tinyglobby": "^0.2.15",
7554
"ts-node": "^10.7.0",
7655
"typescript": "^4.9.4",
77-
"vitest": "^0.26.2",
78-
"vue": "^3.2.33",
79-
"zod": "^3.20.2"
56+
"vitest": "^0.26.2"
8057
}
8158
}

packages/ranger/package.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
{
22
"name": "@tanstack/ranger",
3-
"author": "Tanner Linsley",
43
"version": "0.0.3",
54
"description": "Hooks for building range and multi-range sliders in React",
5+
"author": "Tanner Linsley",
66
"license": "MIT",
7-
"homepage": "https://github.com/tanstack/ranger#readme",
87
"repository": {
98
"type": "git",
109
"url": "git+https://github.com/tanstack/ranger.git"
1110
},
12-
"publishConfig": {
13-
"registry": "https://registry.npmjs.org/"
11+
"homepage": "https://github.com/tanstack/ranger#readme",
12+
"funding": {
13+
"type": "github",
14+
"url": "https://github.com/sponsors/tannerlinsley"
1415
},
1516
"keywords": [
1617
"react",
1718
"ranger",
1819
"ranger"
1920
],
20-
"funding": {
21-
"type": "github",
22-
"url": "https://github.com/sponsors/tannerlinsley"
23-
},
21+
"type": "commonjs",
2422
"module": "build/esm/index.js",
2523
"main": "build/cjs/index.js",
2624
"browser": "build/umd/index.production.js",
@@ -31,5 +29,11 @@
3129
"files": [
3230
"build/**",
3331
"src"
34-
]
32+
],
33+
"scripts": {
34+
"clean": "premove ./build",
35+
"test:lib": "vitest run",
36+
"test:lib:dev": "pnpm test:lib --watch",
37+
"test:types": "tsc --emitDeclarationOnly"
38+
}
3539
}

packages/react-ranger/package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
{
22
"name": "@tanstack/react-ranger",
3-
"author": "Tanner Linsley",
43
"version": "0.0.4",
54
"description": "Hooks for building range and multi-range sliders in React",
5+
"author": "Tanner Linsley",
66
"license": "MIT",
7-
"homepage": "https://github.com/tanstack/ranger#readme",
87
"repository": {
98
"type": "git",
109
"url": "git+https://github.com/tanstack/ranger.git",
1110
"directory": "packages/react-ranger"
1211
},
13-
"publishConfig": {
14-
"registry": "https://registry.npmjs.org/"
15-
},
12+
"homepage": "https://github.com/tanstack/ranger#readme",
1613
"funding": {
1714
"type": "github",
1815
"url": "https://github.com/sponsors/tannerlinsley"
@@ -26,13 +23,15 @@
2623
"build/**",
2724
"src"
2825
],
26+
"scripts": {
27+
"clean": "premove ./build",
28+
"test:lib": "vitest run",
29+
"test:lib:dev": "pnpm test:lib --watch",
30+
"test:types": "tsc --emitDeclarationOnly"
31+
},
2932
"devDependencies": {
30-
"@testing-library/react": "^12.1.2",
3133
"@types/react": "17.0.45",
32-
"@types/react-dom": "17.0.17",
33-
"react": "^17.0.2",
34-
"react-dom": "^17.0.2",
35-
"resize-observer-polyfill": "^1.5.1"
34+
"react": "^17.0.2"
3635
},
3736
"dependencies": {
3837
"@tanstack/ranger": "workspace:*"

0 commit comments

Comments
 (0)