Skip to content

Commit 0398700

Browse files
committed
fix: rewrite remaining .js imports on multi-line from clauses
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 52dbc1c commit 0398700

20 files changed

Lines changed: 24 additions & 24 deletions

File tree

packages/dev-server-import-maps/src/importMapsPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
shouldInject,
1818
mergeImportMaps,
1919
getDocumentBaseUrl,
20-
} from './utils.js';
20+
} from './utils.ts';
2121
import { ImportMap } from '@import-maps/resolve';
2222
import {
2323
createElement,

packages/dev-server-rollup/test/node/plugins/alias.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('@rollup/plugin-alias', () => {
2020

2121
try {
2222
const text = await fetchText(`${host}/app.js`);
23-
expectIncludes(text, "import moduleA from './module-a-stub.js'");
23+
expectIncludes(text, "import moduleA from './module-a-stub.ts'");
2424
} finally {
2525
server.stop();
2626
}

packages/dev-server-rollup/test/node/plugins/node-resolve.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('@rollup/plugin-node-resolve', () => {
1919

2020
try {
2121
const text = await fetchText(`${host}/app.js`);
22-
expectIncludes(text, "import moduleA from './node_modules/module-a/index.js'");
22+
expectIncludes(text, "import moduleA from './node_modules/module-a/index.ts'");
2323
} finally {
2424
server.stop();
2525
}

packages/dev-server-rollup/test/node/plugins/postcss.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ html {
5151
expectIncludes(text, 'export default');
5252
expectIncludes(
5353
text,
54-
"import styleInject from './node_modules/style-inject/dist/style-inject.es.js';",
54+
"import styleInject from './node_modules/style-inject/dist/style-inject.es.ts';",
5555
);
5656
expectIncludes(text, 'styleInject(css_248z);');
5757
} finally {

packages/dev-server-rollup/test/node/rollupBundlePlugin.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ describe('rollupBundlePlugin', () => {
5050

5151
try {
5252
const textA1 = await fetchText(`${host}/a1.js`);
53-
expectIncludes(textA1, "import { b as bc, d } from './__rollup-generated__d.js';");
53+
expectIncludes(textA1, "import { b as bc, d } from './__rollup-generated__d.ts';");
5454
expectIncludes(textA1, 'var a1 = `a ${bc} ${d}`;');
5555
expectIncludes(textA1, 'export { a1 as default };');
5656

5757
const textA2 = await fetchText(`${host}/a2.js`);
58-
expectIncludes(textA2, "import { b as bc, d } from './__rollup-generated__d.js';");
58+
expectIncludes(textA2, "import { b as bc, d } from './__rollup-generated__d.ts';");
5959
expectIncludes(textA2, 'var a2 = `a ${bc} ${d}`;');
6060
expectIncludes(textA2, 'export { a2 as default };');
6161

6262
const textA3 = await fetchText(`${host}/a3.js`);
63-
expectIncludes(textA3, "import { b as bc, d } from './__rollup-generated__d.js';");
63+
expectIncludes(textA3, "import { b as bc, d } from './__rollup-generated__d.ts';");
6464
expectIncludes(textA3, 'var a3 = `a ${bc} ${d}`;');
6565
expectIncludes(textA3, 'export { a3 as default };');
6666

@@ -88,7 +88,7 @@ describe('rollupBundlePlugin', () => {
8888

8989
try {
9090
const text = await fetchText(`${host}/not-bundled.js`);
91-
expectIncludes(text, "import a from './a.js';");
91+
expectIncludes(text, "import a from './a.ts';");
9292
expectIncludes(text, 'export default `not bundled ${a}`;');
9393
} finally {
9494
server.stop();

packages/dev-server-rollup/test/node/unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('@web/dev-server-rollup', () => {
8080

8181
try {
8282
const text = await fetchText(`${host}/app.js`);
83-
expectIncludes(text, "import moduleA from './src/foo.js'");
83+
expectIncludes(text, "import moduleA from './src/foo.ts'");
8484
} finally {
8585
server.stop();
8686
}

packages/rollup-plugin-html/src/input/extract/extractAssets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
isHashedAsset,
99
resolveAssetFilePath,
1010
createAssetPicomatchMatcher,
11-
} from '../../assets/utils.js';
11+
} from '../../assets/utils.ts';
1212

1313
export interface ExtractAssetsParams {
1414
document: Document;

packages/rollup-plugin-html/src/output/injectedUpdatedAssetPaths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
isHashedAsset,
1010
resolveAssetFilePath,
1111
createAssetPicomatchMatcher,
12-
} from '../assets/utils.js';
12+
} from '../assets/utils.ts';
1313
import { InputData } from '../input/InputData.ts';
1414
import { createError } from '../utils.ts';
1515
import { EmittedAssets } from './emitAssets.ts';

packages/rollup-plugin-html/test/src/output/getEntrypointBundles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { expect } from 'chai';
22
import {
33
getEntrypointBundles,
44
createImportPath,
5-
} from '../../../src/output/getEntrypointBundles.js';
5+
} from '../../../src/output/getEntrypointBundles.ts';
66
import { GeneratedBundle, ScriptModuleTag } from '../../../src/RollupPluginHTMLOptions.ts';
77

88
describe('createImportPath()', () => {

packages/storybook-builder/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { rollupPluginMdx } from './rollup-plugin-mdx.ts';
2525
import {
2626
PREBUNDLED_MODULES_DIR,
2727
rollupPluginPrebundleModules,
28-
} from './rollup-plugin-prebundle-modules.js';
28+
} from './rollup-plugin-prebundle-modules.ts';
2929
import { rollupPluginStorybookBuilder } from './rollup-plugin-storybook-builder.ts';
3030
import { stringifyProcessEnvs } from './stringify-process-envs.ts';
3131

0 commit comments

Comments
 (0)