diff --git a/package.json b/package.json index 3c31cd68..3c63d774 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ ] }, "devDependencies": { + "@arethetypeswrong/core": "0.18.4", "@biomejs/biome": "2.2.6", "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", diff --git a/packages/appkit-ui/tsdown.config.ts b/packages/appkit-ui/tsdown.config.ts index f55a5145..c5639328 100644 --- a/packages/appkit-ui/tsdown.config.ts +++ b/packages/appkit-ui/tsdown.config.ts @@ -3,6 +3,11 @@ import { defineConfig } from "tsdown"; export default defineConfig([ { publint: true, + attw: { + profile: "esm-only", + level: "error", + excludeEntrypoints: ["./styles.css"], + }, name: "@databricks/appkit-ui", entry: [ "src/js/index.ts", diff --git a/packages/appkit/tsdown.config.ts b/packages/appkit/tsdown.config.ts index d61e8c53..f5ae0047 100644 --- a/packages/appkit/tsdown.config.ts +++ b/packages/appkit/tsdown.config.ts @@ -3,6 +3,11 @@ import { defineConfig } from "tsdown"; export default defineConfig([ { publint: true, + attw: { + profile: "esm-only", + level: "error", + excludeEntrypoints: ["./type-generator"], + }, name: "@databricks/appkit", entry: ["src/index.ts", "src/beta.ts"], outDir: "dist", diff --git a/packages/lakebase/package.json b/packages/lakebase/package.json index 3fdbfecc..ab25f28a 100644 --- a/packages/lakebase/package.json +++ b/packages/lakebase/package.json @@ -3,7 +3,8 @@ "type": "module", "version": "0.3.0", "description": "PostgreSQL driver for Databricks Lakebase Autoscaling with automatic OAuth token refresh", - "main": "./dist/index.js", + "main": "./dist/index.cjs", + "module": "./dist/index.js", "types": "./dist/index.d.ts", "packageManager": "pnpm@10.21.0", "repository": { @@ -30,9 +31,15 @@ ], "exports": { ".": { - "types": "./dist/index.d.ts", "development": "./src/index.ts", - "default": "./dist/index.js" + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, @@ -56,10 +63,18 @@ "devDependencies": { "@types/pg": "8.16.0" }, - "module": "./dist/index.js", "publishConfig": { "exports": { - ".": "./dist/index.js", + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + }, "./package.json": "./package.json" } } diff --git a/packages/lakebase/tsdown.config.ts b/packages/lakebase/tsdown.config.ts index 4bcf8600..2c391f21 100644 --- a/packages/lakebase/tsdown.config.ts +++ b/packages/lakebase/tsdown.config.ts @@ -3,11 +3,15 @@ import { defineConfig } from "tsdown"; export default defineConfig([ { publint: true, + attw: { + profile: "strict", + level: "error", + }, name: "@databricks/lakebase", entry: "src/index.ts", outDir: "dist", hash: false, - format: "esm", + format: ["esm", "cjs"], platform: "node", minify: false, dts: { @@ -17,8 +21,8 @@ export default defineConfig([ clean: false, unbundle: true, noExternal: [], - outExtensions: () => ({ - js: ".js", + outExtensions: ({ format }) => ({ + js: format === "cjs" ? ".cjs" : ".js", }), external: (id) => { // Bundle all internal modules diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a76e09e9..4557d0fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: .: devDependencies: + '@arethetypeswrong/core': + specifier: 0.18.4 + version: 0.18.4 '@biomejs/biome': specifier: 2.2.6 version: 2.2.6 @@ -64,7 +67,7 @@ importers: version: 19.2.0(@types/node@24.7.2)(magicast@0.3.5) tsdown: specifier: 0.20.3 - version: 0.20.3(oxc-resolver@11.19.1)(publint@0.3.15)(typescript@5.9.3) + version: 0.20.3(@arethetypeswrong/core@0.18.4)(oxc-resolver@11.19.1)(publint@0.3.15)(typescript@5.9.3) tsx: specifier: 4.20.6 version: 4.20.6 @@ -162,7 +165,7 @@ importers: version: 16.6.1 tsdown: specifier: 0.20.3 - version: 0.20.3(oxc-resolver@11.19.1)(publint@0.3.15)(typescript@5.9.3) + version: 0.20.3(@arethetypeswrong/core@0.18.4)(oxc-resolver@11.19.1)(publint@0.3.15)(typescript@5.9.3) tsx: specifier: 4.20.6 version: 4.20.6 @@ -685,6 +688,9 @@ packages: resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} + '@andrewbranch/untar.js@1.0.3': + resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} + '@antfu/install-pkg@1.1.0': resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} @@ -709,6 +715,10 @@ packages: resolution: {integrity: sha512-pJcqUz0FfpJP7yGLcCvlqm9mQuHFPF2xh8Af1B9Z9hr0dBxEJ8MPYrO9Nqst+TZFEskMyPE+x4KVgFoXc+OQgg==} engines: {node: '>=20'} + '@arethetypeswrong/core@0.18.4': + resolution: {integrity: sha512-M5F0ePyN6h2Z6XxRiyIPqjGbltotXLjR0CKA0uKspsDu0QmgTNYvRb4RSQPMUs2ZXZHCCYpbaZbFbYOXLxCjUA==} + engines: {node: '>=20'} + '@asamuzakjp/css-color@4.0.5': resolution: {integrity: sha512-lMrXidNhPGsDjytDy11Vwlb6OIGrT3CmLg3VWNFyWkLWtijKl7xjvForlh8vuj0SHGjgl4qZEQzUmYTeQA2JFQ==} @@ -1478,6 +1488,9 @@ packages: cpu: [x64] os: [win32] + '@braidai/lang@1.1.2': + resolution: {integrity: sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA==} + '@braintree/sanitize-url@7.1.1': resolution: {integrity: sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==} @@ -2663,6 +2676,9 @@ packages: '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} + '@loaderkit/resolve@1.0.6': + resolution: {integrity: sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg==} + '@mdx-js/mdx@3.1.1': resolution: {integrity: sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ==} @@ -5822,6 +5838,9 @@ packages: citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} + cjs-module-lexer@2.2.0: resolution: {integrity: sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==} @@ -7144,6 +7163,9 @@ packages: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} + fflate@0.8.3: + resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} + figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -11244,6 +11266,11 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <6.0.0' + typescript@5.6.1-rc: + resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} + engines: {node: '>=14.17'} + hasBin: true + typescript@5.6.3: resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} @@ -11469,14 +11496,13 @@ packages: deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true - uuid@9.0.1: - resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} - deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). - hasBin: true - validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + validate-npm-package-name@7.0.2: resolution: {integrity: sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A==} engines: {node: ^20.17.0 || >=22.9.0} @@ -12060,6 +12086,8 @@ snapshots: '@alloc/quick-lru@5.2.0': {} + '@andrewbranch/untar.js@1.0.3': {} + '@antfu/install-pkg@1.1.0': dependencies: package-manager-detector: 1.6.0 @@ -12097,6 +12125,17 @@ snapshots: - supports-color optional: true + '@arethetypeswrong/core@0.18.4': + dependencies: + '@andrewbranch/untar.js': 1.0.3 + '@loaderkit/resolve': 1.0.6 + cjs-module-lexer: 1.4.3 + fflate: 0.8.3 + lru-cache: 11.2.2 + semver: 7.7.3 + typescript: 5.6.1-rc + validate-npm-package-name: 5.0.1 + '@asamuzakjp/css-color@4.0.5': dependencies: '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) @@ -13026,6 +13065,8 @@ snapshots: '@biomejs/cli-win32-x64@2.2.6': optional: true + '@braidai/lang@1.1.2': {} + '@braintree/sanitize-url@7.1.1': {} '@bufbuild/protobuf@2.11.0': @@ -14833,6 +14874,10 @@ snapshots: '@leichtgewicht/ip-codec@2.0.5': {} + '@loaderkit/resolve@1.0.6': + dependencies: + '@braidai/lang': 1.1.2 + '@mdx-js/mdx@3.1.1': dependencies: '@types/estree': 1.0.8 @@ -18348,6 +18393,8 @@ snapshots: dependencies: consola: 3.4.2 + cjs-module-lexer@1.4.3: {} + cjs-module-lexer@2.2.0: {} class-variance-authority@0.7.1: @@ -19675,6 +19722,8 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 + fflate@0.8.3: {} + figures@3.2.0: dependencies: escape-string-regexp: 1.0.5 @@ -24322,7 +24371,7 @@ snapshots: optionalDependencies: typescript: 5.9.3 - tsdown@0.20.3(oxc-resolver@11.19.1)(publint@0.3.15)(typescript@5.9.3): + tsdown@0.20.3(@arethetypeswrong/core@0.18.4)(oxc-resolver@11.19.1)(publint@0.3.15)(typescript@5.9.3): dependencies: ansis: 4.2.0 cac: 6.7.14 @@ -24341,6 +24390,7 @@ snapshots: unconfig-core: 7.5.0 unrun: 0.2.28 optionalDependencies: + '@arethetypeswrong/core': 0.18.4 publint: 0.3.15 typescript: 5.9.3 transitivePeerDependencies: @@ -24482,6 +24532,8 @@ snapshots: transitivePeerDependencies: - supports-color + typescript@5.6.1-rc: {} + typescript@5.6.3: {} typescript@5.9.3: {} @@ -24696,6 +24748,8 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 + validate-npm-package-name@5.0.1: {} + validate-npm-package-name@7.0.2: {} validator@13.15.26: {}