Skip to content

Commit

Permalink
fix: remove runtime/config suggestion for db config exports (#10391)
Browse files Browse the repository at this point in the history
* chore: remove runtime/config from package json

* fix: use relative path to dist

* chore: changeset

* Revert "fix: use relative path to dist"

This reverts commit 16c0cc2.

* Revert "chore: remove runtime/config from package json"

This reverts commit c1b4678.

* refactor: types null

* fix: exclude config.ts from tsc

* chore: update consts

* chore: comment on intellisense
  • Loading branch information
bholmesdev authored Mar 11, 2024
1 parent c9a1111 commit 9667ee9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-seals-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/db": patch
---

Remove @astrojs/runtime/config suggestion for astro:db configuration helpers.
6 changes: 1 addition & 5 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"types": "./dist/runtime/index.d.ts",
"import": "./dist/runtime/index.js"
},
"./runtime/config": {
"types": "./dist/runtime/config.d.ts",
"./dist/runtime/config.js": {
"import": "./dist/runtime/config.js"
},
"./package.json": "./package.json"
Expand All @@ -36,9 +35,6 @@
],
"runtime": [
"./dist/runtime/index.d.ts"
],
"runtime/config": [
"./dist/runtime/config.d.ts"
]
}
},
Expand Down
4 changes: 3 additions & 1 deletion packages/db/src/core/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export const PACKAGE_NAME = JSON.parse(
).name;

export const RUNTIME_IMPORT = JSON.stringify(`${PACKAGE_NAME}/runtime`);
export const RUNTIME_CONFIG_IMPORT = JSON.stringify(`${PACKAGE_NAME}/runtime/config`);
// Exposed without type definitions
// to avoid duplicate suggestions in Intellisense
export const RUNTIME_CONFIG_IMPORT = JSON.stringify(`${PACKAGE_NAME}/dist/runtime/config.js`);

export const DB_TYPES_FILE = 'db-types.d.ts';

Expand Down
1 change: 1 addition & 0 deletions packages/db/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src"],
"exclude": ["src/runtime/config.ts"],
"compilerOptions": {
"outDir": "./dist"
}
Expand Down

0 comments on commit 9667ee9

Please sign in to comment.