Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rework publish script #5240

Merged
merged 9 commits into from
Dec 30, 2023
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
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: ci

on:
workflow_dispatch:
inputs:
tag:
description: override release tag
required: false
push:
branches: ['main', 'alpha', 'beta', 'rc']

Expand All @@ -27,12 +32,17 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: |
- name: Run Tests
run: pnpm run test:ci
- name: Publish
run: |
git config --global user.name 'Tanner Linsley'
git config --global user.email '[email protected]'
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
File renamed without changes.
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"repository": "https://github.com/tanstack/table.git",
"packageManager": "[email protected]",
"type": "module",
"scripts": {
"clean": "pnpm --filter \"./packages/**\" run clean",
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
Expand All @@ -15,8 +16,7 @@
"watch": "pnpm run build:all && nx watch --all -- pnpm run build:all",
"dev": "pnpm run watch",
"prettier": "prettier \"packages/*/{src/**,examples/**/src/**}.{md,js,jsx,ts,tsx,json}\" --write",
"cipublish": "ts-node scripts/publish.ts",
"cipublishforce": "CI=true pnpm run cipublish",
"cipublish": "node scripts/publish.js",
"test:pr": "nx affected --targets=test:lib,test:types,build --exclude=examples/**",
"test:ci": "nx run-many --targets=test:lib,test:types,build --exclude=examples/**"
},
Expand All @@ -29,7 +29,7 @@
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.5",
"@commitlint/parse": "^16.2.1",
"@commitlint/parse": "^18.4.3",
"@faker-js/faker": "^8.3.1",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.7",
Expand All @@ -39,17 +39,23 @@
"@testing-library/react": "^12.1.2",
"@testing-library/react-hooks": "^7.0.2",
"@tsconfig/svelte": "^3.0.0",
"@types/current-git-branch": "^1.1.6",
"@types/git-log-parser": "^1.2.3",
"@types/jsonfile": "^6.1.4",
"@types/luxon": "^2.3.1",
"@types/node": "^18.15.10",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"@types/semver": "^7.3.10",
"@types/stream-to-array": "^2.3.3",
"axios": "^0.26.1",
"babel-plugin-transform-async-to-promises": "^0.8.18",
"chalk": "^5.3.0",
"concurrently": "^7.1.0",
"current-git-branch": "^1.1.0",
"git-log-parser": "^1.2.0",
"jsdom": "^21.1.1",
"jsonfile": "^6.1.0",
"luxon": "^2.3.2",
"nx": "^17.2.7",
"prettier": "^3.0.3",
Expand All @@ -61,10 +67,11 @@
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.6.0",
"semver": "^7.5.4",
"solid-js": "^1.6.2",
"stream-to-array": "^2.3.0",
"svelte": "^3.49.0",
"ts-node": "^10.9.2",
"type-fest": "^4.8.3",
"typescript": "5.2.2",
"vitest": "^0.29.3",
"vue": "^3.2.33"
Expand Down
1 change: 1 addition & 0 deletions packages/match-sorter-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"type": "github",
"url": "https://github.com/sponsors/kentcdodds"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/match-sorter-utils/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
1 change: 1 addition & 0 deletions packages/react-table-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-table-devtools/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
1 change: 1 addition & 0 deletions packages/react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-table/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
1 change: 1 addition & 0 deletions packages/solid-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/solid-table/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
1 change: 1 addition & 0 deletions packages/svelte-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-table/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
1 change: 1 addition & 0 deletions packages/table-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/table-core/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
1 change: 1 addition & 0 deletions packages/vue-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"module": "build/lib/index.esm.js",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-table/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'rollup'
import { buildConfigs } from '../../scripts/getRollupConfig.mjs'
import { buildConfigs } from '../../scripts/getRollupConfig.js'

export default defineConfig(
buildConfigs({
Expand Down
Loading