Skip to content
Draft
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
5 changes: 5 additions & 0 deletions packages/appkit-ui/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/appkit/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 20 additions & 5 deletions packages/lakebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
},
Expand All @@ -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"
}
}
Expand Down
10 changes: 7 additions & 3 deletions packages/lakebase/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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
Expand Down
40 changes: 40 additions & 0 deletions patches/@arethetypeswrong__core.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/dist/createPackage.js b/dist/createPackage.js
index 1b8fb1c65a9ccd0fa6448af0781297beeeae9772..872ef981bfc6d4db5245fe63cde9b116f515883f 100644
--- a/dist/createPackage.js
+++ b/dist/createPackage.js
@@ -11,7 +11,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
};
var _Package_files;
import { untar } from "@andrewbranch/untar.js";
-import { Gunzip } from "fflate";
+import { Gunzip, FlateErrorCode } from "fflate";
import { major, maxSatisfying, minor, valid, validRange } from "semver";
import ts from "typescript";
import { parsePackageSpec } from "./utils.js";
@@ -224,9 +224,23 @@ export function createPackageFromTarballData(tarball) {
function extractTarball(tarball) {
var _a;
// Use streaming API to work around https://github.com/101arrowz/fflate/issues/207
- let unzipped;
- new Gunzip((chunk) => (unzipped = chunk)).push(tarball, /*final*/ true);
- const data = untar(unzipped);
+ const chunks = [];
+ try {
+ new Gunzip((chunk) => chunks.push(chunk)).push(tarball, /*final*/ true);
+ }
+ catch (err) {
+ // this happens for zero-padded tarballs; can safely ignore
+ if (err.code !== FlateErrorCode.InvalidHeader) {
+ throw err;
+ }
+ }
+ const unzipped = new Uint8Array(chunks.reduce((a, b) => a + b.length, 0));
+ let offset = 0;
+ for (const chunk of chunks) {
+ unzipped.set(chunk, offset);
+ offset += chunk.length;
+ }
+ const data = untar(unzipped.buffer);
const prefix = data[0].filename.substring(0, data[0].filename.indexOf("/") + 1);
const packageJsonText = (_a = data.find((f) => f.filename === `${prefix}package.json`)) === null || _a === void 0 ? void 0 : _a.fileData;
const packageJson = JSON.parse(new TextDecoder().decode(packageJsonText));
69 changes: 66 additions & 3 deletions pnpm-lock.yaml

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

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ packages:
- "packages/*"
- "apps/*"
- "docs"

patchedDependencies:
"@arethetypeswrong/core": "patches/@arethetypeswrong__core.patch"
Loading