Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 9 additions & 22 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
test:
name: Test
Expand All @@ -15,25 +18,9 @@ jobs:
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Build & Test
run: |
pnpm install --no-frozen-lockfile
pnpm build
pnpm test:ci
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Build
run: pnpm run build
- name: Run Tests
run: pnpm -r test:types && pnpm -r test:lib
29 changes: 11 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ concurrency:
group: publish-${{ github.github.base_ref }}
cancel-in-progress: true

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release:
name: Release
Expand All @@ -18,24 +23,12 @@ jobs:
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Build
run: pnpm run build
- name: Run Tests
run: pnpm -r test:types && pnpm -r test:lib
- name: Publish
run: |
pnpm install --no-frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
provenance=true
16 changes: 3 additions & 13 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,7 @@ module.exports = {
'@babel/react',
'@babel/preset-typescript',
],
plugins: [
// 'babel-plugin-transform-async-to-promises',
cjs && ['@babel/transform-modules-commonjs', { loose }],
// [
// '@babel/transform-runtime',
// {
// useESModules: !cjs,
// version: require('./package.json').devDependencies[
// '@babel/runtime'
// ].replace(/^[^0-9]*/, ''),
// },
// ],
].filter(Boolean),
plugins: [cjs && ['@babel/transform-modules-commonjs', { loose }]].filter(
Boolean,
),
}
35 changes: 6 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
},
"packageManager": "pnpm@10.24.0",
"scripts": {
"clean-dist": "pnpm -rc --parallel exec 'rm -rf build dist'",
"clean-all": "pnpm -rc --parallel exec 'rm -rf build dist node_modules'",
"test": "pnpm run test:ci",
"test:ci": "pnpm run test:lib && pnpm run test:types",
"test:types": "tsc -b",
"test:lib": "vitest run",
"test:lib:dev": "vitest watch",
"clean": "pnpm --filter \"./packages/**\" run clean",
"test:types": "pnpm -r test:types",
"test:lib": "pnpm -r test:lib",
"test:docs": "ts-node scripts/verify-links.ts",
"build": "rollup --config rollup.config.js",
"watch": "concurrently --kill-others \"rollup --config rollup.config.js -w\" \"tsc -b --watch\"",
Expand All @@ -23,59 +19,40 @@
"cipublish": "ts-node scripts/publish.ts",
"cipublishforce": "CI=true pnpm cipublish"
},
"pnpm": {
"overrides": {
"@tanstack/ranger": "workspace:*",
"@tanstack/react-ranger": "workspace:*"
}
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@commitlint/parse": "^16.2.1",
"@faker-js/faker": "^6.3.1",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-node-resolve": "^13.2.1",
"@rollup/plugin-replace": "^4.0.0",
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^7.0.2",
"@tsconfig/svelte": "^3.0.0",
"@types/babel__core": "^7.1.20",
"@types/fs-extra": "^9.0.13",
"@types/luxon": "^2.3.1",
"@types/node": "^17.0.25",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"@types/semver": "^7.3.13",
"axios": "^0.26.1",
"babel-plugin-transform-async-to-promises": "^0.8.18",
"concurrently": "^7.1.0",
"current-git-branch": "^1.1.0",
"fs-extra": "^10.1.0",
"is-ci-cli": "^2.2.0",
"git-log-parser": "^1.2.0",
"knip": "^5.71.0",
"luxon": "^2.3.2",
"markdown-link-extractor": "^4.0.3",
"premove": "^4.0.0",
"prettier": "^3.7.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^2.70.2",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-size": "^0.2.2",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.6.0",
"solid-js": "^1.6.5",
"stream-to-array": "^2.3.0",
"svelte": "^3.55.0",
"tinyglobby": "^0.2.15",
"ts-node": "^10.7.0",
"typescript": "^4.9.4",
"vitest": "^0.26.2",
"vue": "^3.2.33",
"zod": "^3.20.2"
"vitest": "^0.26.2"
}
}
22 changes: 13 additions & 9 deletions packages/ranger/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
{
"name": "@tanstack/ranger",
"author": "Tanner Linsley",
"version": "0.0.3",
"description": "Hooks for building range and multi-range sliders in React",
"author": "Tanner Linsley",
"license": "MIT",
"homepage": "https://github.com/tanstack/ranger#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/tanstack/ranger.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
"homepage": "https://github.com/tanstack/ranger#readme",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"keywords": [
"react",
"ranger",
"ranger"
],
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/esm/index.js",
"main": "build/cjs/index.js",
"browser": "build/umd/index.production.js",
Expand All @@ -31,5 +29,11 @@
"files": [
"build/**",
"src"
]
],
"scripts": {
"clean": "premove ./build",
"test:lib": "vitest run",
"test:lib:dev": "pnpm test:lib --watch",
"test:types": "tsc --emitDeclarationOnly"
}
}
19 changes: 9 additions & 10 deletions packages/react-ranger/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"name": "@tanstack/react-ranger",
"author": "Tanner Linsley",
"version": "0.0.4",
"description": "Hooks for building range and multi-range sliders in React",
"author": "Tanner Linsley",
"license": "MIT",
"homepage": "https://github.com/tanstack/ranger#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/tanstack/ranger.git",
"directory": "packages/react-ranger"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"homepage": "https://github.com/tanstack/ranger#readme",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
Expand All @@ -26,13 +23,15 @@
"build/**",
"src"
],
"scripts": {
"clean": "premove ./build",
"test:lib": "vitest run",
"test:lib:dev": "pnpm test:lib --watch",
"test:types": "tsc --emitDeclarationOnly"
},
"devDependencies": {
"@testing-library/react": "^12.1.2",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"resize-observer-polyfill": "^1.5.1"
"react": "^17.0.2"
},
"dependencies": {
"@tanstack/ranger": "workspace:*"
Expand Down
Loading