Skip to content

Commit

Permalink
chore: update tsup to v8 & make changes to type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis committed Oct 12, 2024
1 parent bfaba44 commit 8294462
Show file tree
Hide file tree
Showing 15 changed files with 736 additions and 123 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"spec.ts": "1.1.3",
"start-server-and-test": "2.0.3",
"three": "0.150.1",
"tsup": "6.7.0",
"tsup": "8.3.0",
"turbo": "1.13.3",
"typescript": "5.3.3",
"vite": "5.2.11",
Expand Down
13 changes: 9 additions & 4 deletions packages/animated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"description": "Animated component props for React",
"module": "./dist/react-spring_animated.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_animated.modern.d.ts",
"types": "./dist/react-spring_animated.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_animated.modern.d.ts",
"import": "./dist/react-spring_animated.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_animated.modern.d.mts",
"default": "./dist/react-spring_animated.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_animated.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_core.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_core.modern.d.ts",
"types": "./dist/react-spring_core.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_core.modern.d.ts",
"import": "./dist/react-spring_core.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_core.modern.d.mts",
"default": "./dist/react-spring_core.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_core.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions packages/parallax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_parallax.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_parallax.modern.d.ts",
"types": "./dist/react-spring_parallax.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_parallax.modern.d.ts",
"import": "./dist/react-spring_parallax.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_parallax.modern.d.mts",
"default": "./dist/react-spring_parallax.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_parallax.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions packages/rafz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"description": "react-spring's fork of rafz one frameloop to rule them all",
"module": "./dist/react-spring_rafz.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_rafz.modern.d.ts",
"types": "./dist/react-spring_rafz.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_rafz.modern.d.ts",
"import": "./dist/react-spring_rafz.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_rafz.modern.d.mts",
"default": "./dist/react-spring_rafz.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_rafz.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions packages/react-spring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.4",
"module": "./dist/react-spring.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring.modern.d.ts",
"types": "./dist/react-spring.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring.modern.d.ts",
"import": "./dist/react-spring.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring.modern.d.mts",
"default": "./dist/react-spring.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"description": "Globals and shared modules",
"module": "./dist/react-spring_shared.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_shared.modern.d.ts",
"types": "./dist/react-spring_shared.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_shared.modern.d.ts",
"import": "./dist/react-spring_shared.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_shared.modern.d.mts",
"default": "./dist/react-spring_shared.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_shared.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"description": "Internal package with TypeScript stuff",
"module": "./dist/react-spring_types.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_types.modern.d.ts",
"types": "./dist/react-spring_types.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_types.modern.d.ts",
"import": "./dist/react-spring_types.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_types.modern.d.mts",
"default": "./dist/react-spring_types.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_types.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions targets/konva/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_konva.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_konva.modern.d.ts",
"types": "./dist/react-spring_konva.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_konva.modern.d.ts",
"import": "./dist/react-spring_konva.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_konva.modern.d.mts",
"default": "./dist/react-spring_konva.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_konva.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions targets/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_native.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_native.modern.d.ts",
"types": "./dist/react-spring_native.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_native.modern.d.ts",
"import": "./dist/react-spring_native.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_native.modern.d.mts",
"default": "./dist/react-spring_native.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_native.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions targets/three/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_three.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_three.modern.d.ts",
"types": "./dist/react-spring_three.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_three.modern.d.ts",
"import": "./dist/react-spring_three.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_three.modern.d.mts",
"default": "./dist/react-spring_three.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_three.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions targets/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_web.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_web.modern.d.ts",
"types": "./dist/react-spring_web.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_web.modern.d.ts",
"import": "./dist/react-spring_web.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_web.modern.d.mts",
"default": "./dist/react-spring_web.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_web.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
13 changes: 9 additions & 4 deletions targets/zdog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
"version": "9.7.5",
"module": "./dist/react-spring_zdog.legacy-esm.js",
"main": "./dist/cjs/index.js",
"types": "./dist/react-spring_zdog.modern.d.ts",
"types": "./dist/react-spring_zdog.modern.d.mts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-spring_zdog.modern.d.ts",
"import": "./dist/react-spring_zdog.modern.mjs",
"require": "./dist/cjs/index.js"
"import": {
"types": "./dist/react-spring_zdog.modern.d.mts",
"default": "./dist/react-spring_zdog.modern.mjs"
},
"require": {
"types": "./dist/cjs/react-spring_zdog.development.d.ts",
"default": "./dist/cjs/index.js"
}
}
},
"files": [
Expand Down
5 changes: 2 additions & 3 deletions tsup.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import fs from 'fs'
import path from 'path'

interface BuildOptions {
format: 'cjs' | 'umd' | 'esm'
format: 'cjs' | 'esm'
name:
| 'development'
| 'production.min'
| 'legacy-esm'
| 'modern'
| 'modern.development'
| 'modern.production.min'
| 'umd'
| 'umd.min'
minify: boolean
env: 'development' | 'production' | ''
target?:
Expand All @@ -33,6 +31,7 @@ const buildTargets: BuildOptions[] = [
target: 'es2020',
minify: false,
env: 'development',
dts: true,
},
{
format: 'cjs',
Expand Down
Loading

0 comments on commit 8294462

Please sign in to comment.