Skip to content

Commit

Permalink
Merge branch 'main' into docs/main-code-transition
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli authored Nov 23, 2024
2 parents 297c919 + e4af4a2 commit 62e5169
Show file tree
Hide file tree
Showing 30 changed files with 72 additions and 39 deletions.
9 changes: 4 additions & 5 deletions configs/tsup/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ export const options: Options = {
}

export const scriptOptions: Options = {
format: ['cjs'],
target: ['chrome51', 'firefox53', 'edge18', 'safari11', 'ios11', 'opera38', 'es6', 'node14'],
entry: ['src/scripts/*.{ts,tsx}', '!**/*.{spec,test,test-d,bench}.*'],
outDir: 'dist/scripts',
sourcemap: true,
format: 'cjs',
target: ['node18'],
entry: ['src/bin/*.{ts,tsx}', '!**/*.{spec,test,test-d,bench}.*'],
outDir: 'dist/bin',
}
7 changes: 7 additions & 0 deletions packages/codemods/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @suspensive/codemods

## 0.1.1

### Patch Changes

- [#1370](https://github.com/toss/suspensive/pull/1370) [`390e82d`](https://github.com/toss/suspensive/commit/390e82d57c30e05201d92aaad3a2bd16b9f57bfe) Thanks [@gwansikk](https://github.com/gwansikk)! - refactor(tsup): update script options
3 changes: 2 additions & 1 deletion packages/codemods/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/codemods",
"version": "0.1.0",
"version": "0.1.1",
"description": "Codemods for @suspensive.",
"keywords": [
"suspensive",
Expand Down Expand Up @@ -42,6 +42,7 @@
"devDependencies": {
"@suspensive/eslint-config": "workspace:*",
"@suspensive/tsconfig": "workspace:*",
"@suspensive/tsup": "workspace:*",
"@types/jscodeshift": "^0.12.0",
"@types/prompts": "^2.4.9"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/codemods/src/transforms/tanstack-query-import.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FileInfo } from 'jscodeshift'
import { createParserFromPath } from '../utils/createParserFromPath'
import { createParserFromPath } from './utils/createParserFromPath'

const IMPORT_TO_CHANGE = [
'useSuspenseQuery',
Expand Down
9 changes: 3 additions & 6 deletions packages/codemods/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { scriptOptions } from '@suspensive/tsup'
import { defineConfig } from 'tsup'

export default defineConfig([
{
format: 'cjs',
target: ['node18'],
entry: ['src/bin/*.{ts,tsx}', '!**/*.{spec,test,test-d,bench}.*'],
outDir: 'dist/bin',
...scriptOptions,
external: ['.bin/jscodeshift'],
},
{
format: 'cjs',
target: ['node18'],
...scriptOptions,
entry: ['src/transforms/*.{ts,tsx}', '!**/*.{spec,test,test-d,bench}.*'],
outDir: 'dist/transforms',
},
Expand Down
2 changes: 2 additions & 0 deletions packages/jotai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @suspensive/jotai

## 2.18.7

## 2.18.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/jotai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/jotai",
"version": "2.18.6",
"version": "2.18.7",
"description": "Suspensive interfaces for jotai",
"keywords": [
"suspensive",
Expand Down
7 changes: 7 additions & 0 deletions packages/react-query-4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @suspensive/react-query-4

## 2.18.7

### Patch Changes

- Updated dependencies []:
- @suspensive/react@2.18.7

## 2.18.6

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query-4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/react-query-4",
"version": "2.18.6",
"version": "2.18.7",
"description": "Suspensive interfaces for @tanstack/react-query@4",
"keywords": [
"suspensive",
Expand Down Expand Up @@ -59,7 +59,7 @@
"react": "catalog:react18"
},
"peerDependencies": {
"@suspensive/react": "workspace:^2.18.6",
"@suspensive/react": "workspace:^2.18.7",
"@tanstack/react-query": "^4",
"react": "^18"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/react-query-5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @suspensive/react-query-5

## 2.18.7

### Patch Changes

- Updated dependencies []:
- @suspensive/react@2.18.7

## 2.18.6

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query-5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/react-query-5",
"version": "2.18.6",
"version": "2.18.7",
"description": "Suspensive interfaces for @tanstack/react-query@5",
"keywords": [
"suspensive",
Expand Down Expand Up @@ -59,7 +59,7 @@
"react": "catalog:react18"
},
"peerDependencies": {
"@suspensive/react": "workspace:^2.18.6",
"@suspensive/react": "workspace:^2.18.7",
"@tanstack/react-query": "^5",
"react": "^18"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/react-query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @suspensive/react-query

## 2.18.7

### Patch Changes

- [#1370](https://github.com/toss/suspensive/pull/1370) [`390e82d`](https://github.com/toss/suspensive/commit/390e82d57c30e05201d92aaad3a2bd16b9f57bfe) Thanks [@gwansikk](https://github.com/gwansikk)! - refactor(tsup): update script options

- Updated dependencies []:
- @suspensive/react@2.18.7
- @suspensive/react-query-4@2.18.7
- @suspensive/react-query-5@2.18.7

## 2.18.6

### Patch Changes
Expand Down
15 changes: 7 additions & 8 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/react-query",
"version": "2.18.6",
"version": "2.18.7",
"description": "Suspensive interfaces for @tanstack/react-query",
"keywords": [
"suspensive",
Expand Down Expand Up @@ -35,8 +35,8 @@
"module": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"suspensive-react-query": "dist/scripts/cli.cjs",
"srq": "dist/scripts/cli.cjs"
"suspensive-react-query": "dist/bin/cli.cjs",
"srq": "dist/bin/cli.cjs"
},
"files": [
"dist",
Expand All @@ -50,14 +50,14 @@
"ci:test": "vitest run --coverage --typecheck",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"postinstall": "node -e \"import('./dist/scripts/postinstall.cjs').catch(e => console.error(e))\"",
"postinstall": "node ./dist/bin/postinstall.cjs || echo 'please reinstall @suspensive/react-query'",
"prepack": "pnpm build",
"test:ui": "vitest --ui --coverage --typecheck"
},
"dependencies": {
"@commander-js/extra-typings": "^12.1.0",
"@suspensive/react-query-4": "workspace:^2.18.6",
"@suspensive/react-query-5": "workspace:^2.18.6",
"@suspensive/react-query-4": "workspace:^2.18.7",
"@suspensive/react-query-5": "workspace:^2.18.7",
"cli-table3": "^0.6.5",
"commander": "^12.1.0"
},
Expand All @@ -66,12 +66,11 @@
"@suspensive/react": "workspace:*",
"@suspensive/tsconfig": "workspace:*",
"@suspensive/tsup": "workspace:*",
"@tanstack/react-query": "catalog:react-query4",
"@types/react": "catalog:react18",
"react": "catalog:react18"
},
"peerDependencies": {
"@suspensive/react": "workspace:^2.18.6",
"@suspensive/react": "workspace:^2.18.7",
"@tanstack/react-query": "^4 || ^5",
"react": "^18"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import packageJson from '../../package.json'
import { getTanStackReactQueryPackageJson } from './utils/package'
import { getStatusTable } from './utils/table'

const cliPath = path.resolve(__dirname, '../../dist/scripts/cli.cjs')
const cliPath = path.resolve(__dirname, '../../dist/bin/cli.cjs')

describe('cli', () => {
it('should display the correct version when using the -v flag', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
#!/usr/bin/env node
'use strict'

import { Command } from '@commander-js/extra-typings'
import { fixAction, statusAction, switchAction } from './utils/commands'
import { getPackageJson } from './utils/package'

const packageJson = getPackageJson()
const program = new Command()
const program = new Command(packageJson.name)

program
.name(packageJson.name)
.description(packageJson.description)
.version(packageJson.version, '-v, --version', 'Displays the currently installed version of @suspensive/react-query')

program
.command('status')
.description('Checks compatibility with the currently used version of @tanstack/react-query')
.action(() => statusAction())
.action(statusAction)

program
.command('switch')
Expand All @@ -34,6 +32,6 @@ program
.description(
"Automatically switch @suspensive/react-query's exports to use compatible Suspensive interfaces for @tanstack/react-query"
)
.action(() => fixAction())
.action(fixAction)

program.parse()
program.parse(process.argv)
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @suspensive/react

## 2.18.7

## 2.18.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@suspensive/react",
"version": "2.18.6",
"version": "2.18.7",
"description": "Suspensive interface for react",
"keywords": [
"suspensive",
Expand Down
13 changes: 8 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 62e5169

Please sign in to comment.