Skip to content

Commit

Permalink
chore: use text based Bun lockfile (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Feb 4, 2025
1 parent 53a756c commit afeb8a5
Show file tree
Hide file tree
Showing 7 changed files with 1,642 additions and 5,488 deletions.
1,635 changes: 1,635 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Binary file removed bun.lockb
Binary file not shown.
2 changes: 0 additions & 2 deletions bunfig.toml

This file was deleted.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,12 @@
"@hono/eslint-config": "^1.0.2",
"@mdx-js/rollup": "^3.0.0",
"@playwright/test": "^1.42.0",
"@types/babel__generator": "^7",
"@types/babel__traverse": "^7",
"@types/node": "^20.10.5",
"eslint": "^9.10.0",
"glob": "^10.3.10",
"happy-dom": "^15.11.6",
"hono": "4.4.13",
"np": "7.7.0",
"np": "^10.2.0",
"prettier": "^3.1.1",
"publint": "^0.2.7",
"tsup": "^8.1.0",
Expand All @@ -152,4 +150,4 @@
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "^4.9.6"
}
}
}
1 change: 1 addition & 0 deletions src/vite/inject-importing-islands.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-expect-error don't use types
import _generate from '@babel/generator'
import { parse } from '@babel/parser'
import precinct from 'precinct'
Expand Down
4 changes: 4 additions & 0 deletions src/vite/island-components.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// @ts-expect-error don't use types
import _generate from '@babel/generator'
import { parse } from '@babel/parser'
// @ts-expect-error don't use types
import _traverse from '@babel/traverse'
import {
blockStatement,
Expand Down Expand Up @@ -77,6 +79,7 @@ export const transformJsxTags = (contents: string, componentName: string) => {
let isTransformed = false

traverse(ast, {
// @ts-expect-error path is not typed
ExportNamedDeclaration(path) {
if (path.node.declaration?.type === 'FunctionDeclaration') {
// transform `export function NamedFunction() {}`
Expand Down Expand Up @@ -131,6 +134,7 @@ export const transformJsxTags = (contents: string, componentName: string) => {
specifier.local.name = wrappedFunctionId.name
}
},
// @ts-expect-error path is not typed
ExportDefaultDeclaration(path) {
const declarationType = path.node.declaration.type
if (
Expand Down
Loading

0 comments on commit afeb8a5

Please sign in to comment.