Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/acs-reader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"clean": "tsc -b --clean; rm -rf dist",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"test": "vitest run --project node --project browser",
Expand All @@ -30,7 +30,7 @@
"@vitest/coverage-v8": "^4.1.10",
"openapi-typescript": "^7.13.0",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsup'
import { base } from '../../tsup.base'
import { defineConfig } from 'tsdown'
import { base } from '../../tsdown.base.ts'

export default defineConfig({
...base,
Expand Down
6 changes: 3 additions & 3 deletions core/amulet-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"clean": "tsc -b --clean; rm -rf dist",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"test": "vitest run --project node --project browser --passWithNoTests",
Expand All @@ -30,7 +30,7 @@
"@vitest/coverage-v8": "^4.1.10",
"openapi-typescript": "^7.13.0",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsup'
import { base } from '../../tsup.base'
import { defineConfig } from 'tsdown'
import { base } from '../../tsdown.base.ts'

export default defineConfig({
...base,
Expand Down
6 changes: 3 additions & 3 deletions core/asyncapi-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"clean": "tsc -b --clean; rm -rf dist",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"test": "vitest run --project node --project browser --passWithNoTests",
Expand All @@ -30,7 +30,7 @@
"@vitest/coverage-v8": "^4.1.10",
"openapi-typescript": "^7.13.0",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsup'
import { base } from '../../tsup.base'
import { defineConfig } from 'tsdown'
import { base } from '../../tsdown.base.ts'

export default defineConfig({
...base,
Expand Down
6 changes: 3 additions & 3 deletions core/daml-codegen-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"clean": "tsc -b --clean; rm -rf dist",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"test": "vitest run --project node --project browser --passWithNoTests",
Expand All @@ -27,7 +27,7 @@
"devDependencies": {
"@types/node": "^25.9.4",
"@vitest/coverage-v8": "^4.1.10",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsup'
import { base } from '../../tsup.base'
import { defineConfig } from 'tsdown'
import { base } from '../../tsdown.base.ts'

export default defineConfig({
...base,
Expand Down
6 changes: 3 additions & 3 deletions core/ledger-client-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"clean": "tsc -b --clean; rm -rf dist",
"test": "vitest run --project node --project browser",
Expand All @@ -30,7 +30,7 @@
"@vitest/coverage-v8": "^4.1.10",
"openapi-typescript": "^7.13.0",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
10 changes: 10 additions & 0 deletions core/ledger-client-types/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsdown'
import { base } from '../../tsdown.base.ts'

export default defineConfig({
...base,
entry: ['src/index.ts'],
})
10 changes: 0 additions & 10 deletions core/ledger-client-types/tsup.config.ts

This file was deleted.

6 changes: 3 additions & 3 deletions core/ledger-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"clean": "tsc -b --clean; rm -rf dist",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"test": "vitest run --project node --project browser",
Expand All @@ -30,7 +30,7 @@
"@vitest/coverage-v8": "^4.1.10",
"openapi-typescript": "^7.13.0",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
4 changes: 2 additions & 2 deletions core/ledger-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export {
promiseWithTimeout,
isJsCantonError,
asJsCantonError,
JsCantonError,
JSContractEntry,
type JsCantonError,
type JSContractEntry,
defaultRetryableOptions,
} from './ledger-api-utils.js'
10 changes: 10 additions & 0 deletions core/ledger-client/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsdown'
import { base } from '../../tsdown.base.ts'

export default defineConfig({
...base,
entry: ['src/index.ts'],
})
10 changes: 0 additions & 10 deletions core/ledger-client/tsup.config.ts

This file was deleted.

6 changes: 3 additions & 3 deletions core/ledger-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"clean": "tsc -b --clean; rm -rf dist",
"test": "vitest run --project node --project browser --passWithNoTests",
Expand All @@ -31,7 +31,7 @@
"@vitest/coverage-v8": "^4.1.10",
"esbuild-plugin-replace": "^1.4.0",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
62 changes: 62 additions & 0 deletions core/ledger-proto/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (c) 2025-2026 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { defineConfig } from 'tsdown'
import type { Plugin } from 'rolldown'

const rewriteRelativeJsToCjs: Plugin = {
name: 'rewrite-relative-js-to-cjs',
renderChunk(code) {
return code
.replace(
/from\s+(['"])(\.{1,2}\/[^'"]+?)\.js\1/g,
'from $1$2.cjs$1'
)
.replace(
/import\(\s*(['"])(\.{1,2}\/[^'"]+?)\.js\1\s*\)/g,
'import($1$2.cjs$1)'
)
.replace(
/require\(\s*(['"])(\.{1,2}\/[^'"]+?)\.js\1\s*\)/g,
'require($1$2.cjs$1)'
)
},
}

const entry = [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/**/*.spec.ts',
'!src/**/__tests__/**',
]

export default defineConfig([
{
entry,
unbundle: true,
format: ['esm'],
sourcemap: true,
target: 'es2020',
outDir: 'dist/esm',
outExtensions: () => ({ js: '.js' }),
platform: 'neutral',
treeshake: false,
clean: true,
dts: false,
},
{
entry,
unbundle: true,
format: ['cjs'],
sourcemap: false,
target: 'es2020',
outDir: 'dist/cjs',
outExtensions: () => ({ js: '.cjs' }),
platform: 'node',
treeshake: false,
clean: false,
dts: false,
plugins: [rewriteRelativeJsToCjs],
},
])
71 changes: 0 additions & 71 deletions core/ledger-proto/tsup.config.ts

This file was deleted.

6 changes: 3 additions & 3 deletions core/provider-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"scripts": {
"build": "tsup --onSuccess \"tsc\"",
"dev": "tsup --watch --onSuccess \"tsc\"",
"build": "tsdown --onSuccess \"tsc\"",
"dev": "tsdown --watch --onSuccess \"tsc\"",
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
"clean": "tsc -b --clean; rm -rf dist",
"test": "vitest run --project node --project browser --passWithNoTests",
Expand All @@ -28,7 +28,7 @@
"@vitest/browser-playwright": "^4.1.10",
"@vitest/coverage-v8": "^4.1.10",
"playwright": "^1.61.1",
"tsup": "^8.5.1",
"tsdown": "^0.22.9",
"typescript": "^5.9.3",
"vitest": "^4.1.10"
},
Expand Down
Loading
Loading