Skip to content

Commit eecb7af

Browse files
committed
chore: Unbundle & let tsc transpile the output
1 parent 850c676 commit eecb7af

12 files changed

+27
-2
lines changed

packages/nuqs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"scripts": {
103103
"dev": "tsup --watch",
104104
"prebuild": "rm -rf dist",
105-
"build": "tsup",
105+
"build": "tsc --project tsconfig.build.json",
106106
"postbuild": "size-limit --json > size.json",
107107
"test": "pnpm run '/^test:/'",
108108
"test:types": "tsd",

packages/nuqs/src/adapters/custom.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
export { renderQueryString } from '../url-encoding'
24
export type {
35
AdapterInterface as unstable_AdapterInterface,

packages/nuqs/src/adapters/next.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import type { AdapterInterface } from './defs'
24
import { createAdapterProvider } from './internal.context'
35
import { useNuqsNextAppRouterAdapter } from './next/impl.app'

packages/nuqs/src/adapters/next/app.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import { createAdapterProvider } from '../internal.context'
24
import { useNuqsNextAppRouterAdapter } from './impl.app'
35

packages/nuqs/src/adapters/next/impl.app.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
'use client'
2+
13
import { useRouter, useSearchParams } from 'next/navigation'
2-
import { useCallback, useOptimistic, startTransition } from 'react'
4+
import { startTransition, useCallback, useOptimistic } from 'react'
35
import { debug } from '../../debug'
46
import type { AdapterInterface, UpdateUrlFunction } from '../defs'
57
import { renderURL } from './shared'

packages/nuqs/src/adapters/next/pages.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import { createAdapterProvider } from '../internal.context'
24
import { useNuqsNextPagesRouterAdapter } from './impl.pages'
35

packages/nuqs/src/adapters/react-router.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import { useNavigate, useSearchParams } from 'react-router-dom'
24
import { renderQueryString } from '../url-encoding'
35
import type { AdapterOptions } from './defs'

packages/nuqs/src/adapters/react.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import mitt from 'mitt'
24
import { useEffect, useState } from 'react'
35
import { renderQueryString } from '../url-encoding'

packages/nuqs/src/adapters/remix.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import { useNavigate, useSearchParams } from '@remix-run/react'
24
import { renderQueryString } from '../url-encoding'
35
import type { AdapterOptions } from './defs'

packages/nuqs/src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
export type { HistoryOptions, Options, SearchParams } from './defs'
24
export * from './parsers'
35
export { createSerializer } from './serializer'
File renamed without changes.

packages/nuqs/tsconfig.build.json

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"noEmit": false,
5+
"outDir": "dist",
6+
"declaration": true,
7+
"declarationMap": false,
8+
"incremental": false
9+
},
310
"include": ["src/**/*.ts"],
411
"exclude": ["src/tests", "src/**/*.test.ts", "src/**/*.test.tsx"]
512
}

0 commit comments

Comments
 (0)