Skip to content

Commit

Permalink
chore: Use updated publish.js script (#540)
Browse files Browse the repository at this point in the history
* Initial rename and copy

* Update relevant packages

* Remove ts-node

* Mark root as ESM

* Move getTsupConfig

* Remove eslint-plugin-compat

* Make codesandbox run Node 18
  • Loading branch information
lachlancollins authored Dec 31, 2023
1 parent 63d6aea commit 2c3e848
Show file tree
Hide file tree
Showing 23 changed files with 616 additions and 770 deletions.
7 changes: 0 additions & 7 deletions .browserslistrc

This file was deleted.

9 changes: 7 additions & 2 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"installCommand": "install:csb",
"sandboxes": ["/examples/react/basic-typescript", "/examples/solid/basic-typescript", "/examples/svelte/basic", "/examples/vue/basic"],
"sandboxes": [
"/examples/react/basic-typescript",
"/examples/solid/basic-typescript",
"/examples/svelte/basic",
"/examples/vue/basic"
],
"packages": ["packages/**"],
"node": "16"
"node": "18"
}
3 changes: 1 addition & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
const config = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'compat', 'import'],
plugins: ['@typescript-eslint', 'import'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:compat/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ concurrency:

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
NX_VERBOSE_LOGGING: true

jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"parallel": 5,
"namedInputs": {
"sharedGlobals": [
"{workspaceRoot}/.browserslistrc",
"{workspaceRoot}/.eslintrc.cjs",
"{workspaceRoot}/.nvmrc",
"{workspaceRoot}/package.json",
"{workspaceRoot}/getTsupConfig.js",
"{workspaceRoot}/scripts/getTsupConfig.js",
"{workspaceRoot}/tsconfig.json"
],
"default": [
Expand Down
16 changes: 8 additions & 8 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/form.git",
"packageManager": "pnpm@8.12.1",
"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 @@ -22,7 +23,7 @@
"dev": "pnpm run watch",
"prettier": "prettier \"{packages,examples,scripts}/**/*.{md,js,jsx,cjs,ts,tsx,json,vue}\"",
"prettier:write": "pnpm run prettier --write",
"cipublish": "ts-node scripts/publish.ts",
"cipublish": "node scripts/publish.js",
"cipublishforce": "CI=true pnpm cipublish"
},
"nx": {
Expand All @@ -39,31 +40,31 @@
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"@testing-library/vue": "^7.0.0",
"@types/current-git-branch": "^1.1.4",
"@types/current-git-branch": "^1.1.6",
"@types/git-log-parser": "^1.2.3",
"@types/eslint": "^8.56.0",
"@types/jest": "^26.0.4",
"@types/jsonfile": "^6.1.1",
"@types/jsonfile": "^6.1.4",
"@types/luxon": "^2.3.1",
"@types/node": "^18.15.3",
"@types/react": "^18.0.14",
"@types/react-dom": "^18.0.5",
"@types/semver": "^7.3.13",
"@types/stream-to-array": "^2.3.1",
"@types/stream-to-array": "^2.3.3",
"@types/testing-library__jest-dom": "^5.14.5",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1",
"@vitest/coverage-istanbul": "^0.34.3",
"axios": "^0.26.1",
"bundlewatch": "^0.3.2",
"chalk": "^4.1.2",
"chalk": "^5.3.0",
"concurrently": "^8.2.1",
"cpy-cli": "^5.0.0",
"current-git-branch": "^1.1.0",
"esbuild-plugin-file-path-extensions": "^1.0.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-compat": "^4.1.4",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand All @@ -83,9 +84,8 @@
"semver": "^7.3.8",
"solid-js": "^1.6.13",
"stream-to-array": "^2.3.0",
"ts-node": "^10.9.1",
"tsup": "8.0.1",
"type-fest": "^3.11.0",
"type-fest": "^4.8.3",
"typescript": "^5.2.2",
"typescript48": "npm:typescript@4.8",
"typescript49": "npm:typescript@4.9",
Expand Down
2 changes: 0 additions & 2 deletions packages/form-core/src/FieldApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,6 @@ export class FieldApi<
const fieldValidatorMeta = this.getInfo().validationMetaMap[key]

fieldValidatorMeta?.lastAbortController.abort()
// Sorry Safari 12
// eslint-disable-next-line compat/compat
const controller = new AbortController()

this.getInfo().validationMetaMap[key] = {
Expand Down
2 changes: 0 additions & 2 deletions packages/form-core/src/FormApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,6 @@ export class FormApi<
const fieldValidatorMeta = this.state.validationMetaMap[key]

fieldValidatorMeta?.lastAbortController.abort()
// Sorry Safari 12
// eslint-disable-next-line compat/compat
const controller = new AbortController()

this.state.validationMetaMap[key] = {
Expand Down
2 changes: 1 addition & 1 deletion packages/form-core/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../getTsupConfig.js'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts'] }),
Expand Down
2 changes: 1 addition & 1 deletion packages/react-form/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../getTsupConfig.js'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts', 'src/*.tsx'] }),
Expand Down
2 changes: 1 addition & 1 deletion packages/valibot-form-adapter/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../getTsupConfig.js'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts'] }),
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-form/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../getTsupConfig.js'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts', 'src/*.tsx'] }),
Expand Down
2 changes: 1 addition & 1 deletion packages/yup-form-adapter/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../getTsupConfig.js'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts'] }),
Expand Down
2 changes: 1 addition & 1 deletion packages/zod-form-adapter/tsup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import { defineConfig } from 'tsup'
import { legacyConfig, modernConfig } from '../../getTsupConfig.js'
import { legacyConfig, modernConfig } from '../../scripts/getTsupConfig.js'

export default defineConfig([
modernConfig({ entry: ['src/*.ts'] }),
Expand Down
Loading

0 comments on commit 2c3e848

Please sign in to comment.