Skip to content

Commit ec6ff45

Browse files
Copilothi-ogawa
andcommitted
chore: use partitionByNewline to reduce import reordering diff
Co-authored-by: hi-ogawa <4232207+hi-ogawa@users.noreply.github.com>
1 parent b90e76c commit ec6ff45

File tree

161 files changed

+63
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+63
-221
lines changed

.oxfmtrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"printWidth": 80,
44
"semi": false,
55
"singleQuote": true,
6-
"experimentalSortImports": {}
6+
"experimentalSortImports": {
7+
"newlinesBetween": false,
8+
"partitionByNewline": true
9+
}
710
}

packages/common/refresh-utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Plugin } from 'vite'
2-
32
import { exactRegex } from '@rolldown/pluginutils'
43

54
export const runtimePublicPath = '/@react-refresh'
@@ -42,7 +41,9 @@ if (import.meta.hot && !inWebWorker) {
4241
}
4342
4443
RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
45-
RefreshRuntime.registerExportsForReactRefresh(${JSON.stringify(id)}, currentExports);
44+
RefreshRuntime.registerExportsForReactRefresh(${JSON.stringify(
45+
id,
46+
)}, currentExports);
4647
import.meta.hot.accept((nextExports) => {
4748
if (!nextExports) return;
4849
const invalidateMessage = RefreshRuntime.validateRefreshBoundaryAndEnqueueUpdate(${JSON.stringify(

packages/plugin-react-oxc/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { BuildOptions, Plugin } from 'vite'
2-
32
import { exactRegex } from '@rolldown/pluginutils'
43
import {
54
addRefreshWrapper,

packages/plugin-react-swc/playground/base-path/__tests__/base-path.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from '@playwright/test'
2-
32
import { setupDevServer, setupWaitForLogs } from '../../utils.ts'
43

54
test('Base path HMR', async ({ page }) => {

packages/plugin-react-swc/playground/base-path/src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { StrictMode } from 'react'
22
import { createRoot } from 'react-dom/client'
3-
43
import { App } from './App.tsx'
54

65
createRoot(document.getElementById('root')!).render(

packages/plugin-react-swc/playground/class-components/__tests__/class-components.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from '@playwright/test'
2-
32
import { setupDevServer, setupWaitForLogs } from '../../utils.ts'
43

54
test('Class component HMR', async ({ page }) => {

packages/plugin-react-swc/playground/class-components/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Component } from 'react'
2-
32
import { getGetting } from './utils.tsx'
43

54
export class App extends Component {

packages/plugin-react-swc/playground/class-components/src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { StrictMode } from 'react'
22
import { createRoot } from 'react-dom/client'
3-
43
import { App } from './App.tsx'
54

65
createRoot(document.getElementById('root')!).render(

packages/plugin-react-swc/playground/decorators/__tests__/decorators.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect, test } from '@playwright/test'
2-
32
import { setupBuildAndPreview, setupDevServer } from '../../utils.ts'
43

54
test('Decorators build', async ({ page }) => {

packages/plugin-react-swc/playground/decorators/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { ComponentClass } from 'react'
2-
32
import { Component } from 'react'
43

54
function decorated(target: ComponentClass) {

0 commit comments

Comments
 (0)