Skip to content

Commit

Permalink
chore: Unbundle & let tsc transpile the output
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Nov 17, 2024
1 parent 850c676 commit eecb7af
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nuqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"scripts": {
"dev": "tsup --watch",
"prebuild": "rm -rf dist",
"build": "tsup",
"build": "tsc --project tsconfig.build.json",
"postbuild": "size-limit --json > size.json",
"test": "pnpm run '/^test:/'",
"test:types": "tsd",
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/custom.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

export { renderQueryString } from '../url-encoding'
export type {
AdapterInterface as unstable_AdapterInterface,
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/next.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import type { AdapterInterface } from './defs'
import { createAdapterProvider } from './internal.context'
import { useNuqsNextAppRouterAdapter } from './next/impl.app'
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/next/app.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { createAdapterProvider } from '../internal.context'
import { useNuqsNextAppRouterAdapter } from './impl.app'

Expand Down
4 changes: 3 additions & 1 deletion packages/nuqs/src/adapters/next/impl.app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use client'

import { useRouter, useSearchParams } from 'next/navigation'
import { useCallback, useOptimistic, startTransition } from 'react'
import { startTransition, useCallback, useOptimistic } from 'react'
import { debug } from '../../debug'
import type { AdapterInterface, UpdateUrlFunction } from '../defs'
import { renderURL } from './shared'
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/next/pages.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { createAdapterProvider } from '../internal.context'
import { useNuqsNextPagesRouterAdapter } from './impl.pages'

Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/react-router.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { useNavigate, useSearchParams } from 'react-router-dom'
import { renderQueryString } from '../url-encoding'
import type { AdapterOptions } from './defs'
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/react.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import mitt from 'mitt'
import { useEffect, useState } from 'react'
import { renderQueryString } from '../url-encoding'
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/adapters/remix.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { useNavigate, useSearchParams } from '@remix-run/react'
import { renderQueryString } from '../url-encoding'
import type { AdapterOptions } from './defs'
Expand Down
2 changes: 2 additions & 0 deletions packages/nuqs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

export type { HistoryOptions, Options, SearchParams } from './defs'
export * from './parsers'
export { createSerializer } from './serializer'
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions packages/nuqs/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"outDir": "dist",
"declaration": true,
"declarationMap": false,
"incremental": false
},
"include": ["src/**/*.ts"],
"exclude": ["src/tests", "src/**/*.test.ts", "src/**/*.test.tsx"]
}

0 comments on commit eecb7af

Please sign in to comment.