Skip to content

Commit e6aeb22

Browse files
JohnMcLearclaude
andcommitted
fix: use 'import type' syntax for type-only imports
microbundle's babel parser (@babel/parser@7.29.2) doesn't support the inline 'type' modifier in destructured imports (e.g. 'import {type Foo} from ...'). Replace with separate 'import type { Foo } from ...' statements which are supported. Fixes the release/publish-npm CI step that was failing on every push to main with: SyntaxError: Unexpected token, expected "," (1:18) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0949b15 commit e6aeb22

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import Ajv, {type JTDDataType} from 'ajv/dist/jtd';
2-
import {isContext, logger, setLogger, type Awaitable, type Context, type Logger} from './common';
1+
import Ajv from 'ajv/dist/jtd';
2+
import type {JTDDataType} from 'ajv/dist/jtd';
3+
import {isContext, logger, setLogger} from './common';
4+
import type {Awaitable, Context, Logger} from './common';
35
import * as mariadb from './mariadb';
46
import * as javascript from './javascript';
57

src/javascript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {type JTDDataType} from 'ajv/dist/jtd';
2-
import {type Context, type Optional} from './common';
1+
import type {JTDDataType} from 'ajv/dist/jtd';
2+
import type {Context, Optional} from './common';
33

44
export const schema = {
55
properties: {

src/mariadb.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import {type JTDDataType} from 'ajv/dist/jtd';
2-
import {logger, type Context} from './common';
3-
import {createPool, type Pool, type PoolConfig} from 'mariadb';
1+
import type {JTDDataType} from 'ajv/dist/jtd';
2+
import {logger} from './common';
3+
import type {Context} from './common';
4+
import {createPool} from 'mariadb';
5+
import type {Pool, PoolConfig} from 'mariadb';
46

57
export const schema = {
68
properties: {

0 commit comments

Comments
 (0)