Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: auto-format generated types with prettier #70405

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions packages/next/src/build/swc/generated-wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@

/* tslint:disable */
/* eslint-disable */
/**
* @param {string} value
* @param {any} opts
* @returns {any}
*/
export function mdxCompileSync(value: string, opts: any): any
/**
* @param {string} value
* @param {any} opts
* @returns {Promise<any>}
*/
export function mdxCompile(value: string, opts: any): Promise<any>
/**
* @param {string} s
* @param {any} opts
Expand Down Expand Up @@ -51,3 +39,15 @@ export function parseSync(s: string, opts: any): any
* @returns {Promise<any>}
*/
export function parse(s: string, opts: any): Promise<any>
/**
* @param {string} value
* @param {any} opts
* @returns {any}
*/
export function mdxCompileSync(value: string, opts: any): any
/**
* @param {string} value
* @param {any} opts
* @returns {Promise<any>}
*/
export function mdxCompile(value: string, opts: any): Promise<any>
8 changes: 8 additions & 0 deletions scripts/build-native.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
booleanArg,
execAsyncWithOutput,
execFn,
exec,
namedValueArg,
} = require('./pack-util.cjs')
const fs = require('fs')
Expand Down Expand Up @@ -85,4 +86,11 @@ function writeTypes() {
vendoredTypes + generatedTypesMarker + generatedNotice + generatedTypes

fs.writeFileSync(vendoredTypesPath, vendoredTypes)

exec('Prettify generated types', [
'pnpm',
'prettier',
'--write',
vendoredTypesPath,
])
}
8 changes: 8 additions & 0 deletions scripts/build-wasm.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
booleanArg,
execAsyncWithOutput,
execFn,
exec,
namedValueArg,
} = require('./pack-util.cjs')
const fs = require('fs')
Expand Down Expand Up @@ -79,4 +80,11 @@ function writeTypes() {
const vendoredTypes = generatedNotice + generatedTypes

fs.writeFileSync(vendoredTypesPath, vendoredTypes)

exec('Prettify generated types', [
'pnpm',
'prettier',
'--write',
vendoredTypesPath,
])
}
Loading