Skip to content

Commit

Permalink
fix: fixes an issue where the type imports could not be resolved (#5297)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasholzer authored Sep 19, 2023
1 parent 4baa4dc commit 0a72c89
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion packages/build/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildSite } from './core/main.js'

// export the legacy types
export type * from '../types/index.d.ts'
export type * from '../types/index.js'

// actual main types
export { startDev } from './core/dev.js'
Expand Down
2 changes: 1 addition & 1 deletion packages/build/types/config/inputs.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { JSONValue } from '../utils/json_value.d.ts'
import type { JSONValue } from '../utils/json_value.js'

// Helper type to be used as a workaround for the fact that `interface`s don't have implicit
// index signatures: https://github.com/microsoft/TypeScript/issues/15300
Expand Down
8 changes: 4 additions & 4 deletions packages/build/types/config/netlify_config.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Many } from '../utils/many.d.ts'
import type { Many } from '../utils/many.js'

import type { Build } from './build.d.ts'
import type { Functions } from './functions.d.ts'
import type { PluginInputs } from './inputs.d.ts'
import type { Build } from './build.js'
import type { Functions } from './functions.js'
import type { PluginInputs } from './inputs.js'

type HttpStatusCode = number

Expand Down
12 changes: 6 additions & 6 deletions packages/build/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export type { NetlifyPlugin } from './netlify_plugin.d.ts'
export type { NetlifyPluginOptions } from './netlify_plugin_options.d.ts'
export type { OnBuild, OnEnd, OnError, OnPostBuild, OnPreBuild, OnSuccess } from './netlify_event_handler.d.ts'
export type { NetlifyConfig } from './config/netlify_config.d.ts'
export type { NetlifyPlugin } from './netlify_plugin.js'
export type { NetlifyPluginOptions } from './netlify_plugin_options.js'
export type { OnBuild, OnEnd, OnError, OnPostBuild, OnPreBuild, OnSuccess } from './netlify_event_handler.js'
export type { NetlifyConfig } from './config/netlify_config.js'
export type { NetlifyPluginUtils } from './options/netlify_plugin_utils.js'
export type { NetlifyPluginConstants } from './netlify_plugin_constants.d.ts'
export type { ListedFunction, ListedFunctionFile } from './options/netlify_plugin_functions_util.d.ts'
export type { NetlifyPluginConstants } from './netlify_plugin_constants.js'
export type { ListedFunction, ListedFunctionFile } from './options/netlify_plugin_functions_util.js'
4 changes: 2 additions & 2 deletions packages/build/types/netlify_event_handler.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PluginInputs, StringKeys } from './config/inputs.d.ts'
import type { NetlifyPluginOptions } from './netlify_plugin_options.d.ts'
import type { PluginInputs, StringKeys } from './config/inputs.js'
import type { NetlifyPluginOptions } from './netlify_plugin_options.js'

interface NetlifyEventHandler<PluginOptions extends NetlifyPluginOptions = NetlifyPluginOptions> {
(options: PluginOptions): void | Promise<void>
Expand Down
4 changes: 2 additions & 2 deletions packages/build/types/netlify_plugin.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PluginInputs } from './config/inputs.d.ts'
import type { OnBuild, OnEnd, OnError, OnPostBuild, OnPreBuild, OnSuccess } from './netlify_event_handler.d.ts'
import type { PluginInputs } from './config/inputs.js'
import type { OnBuild, OnEnd, OnError, OnPostBuild, OnPreBuild, OnSuccess } from './netlify_event_handler.js'

export interface NetlifyPlugin<TInputs extends PluginInputs = PluginInputs> {
/**
Expand Down
10 changes: 5 additions & 5 deletions packages/build/types/netlify_plugin_options.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { PluginInputs, StringKeys } from './config/inputs.d.ts'
import type { NetlifyConfig } from './config/netlify_config.d.ts'
import type { NetlifyPluginConstants } from './netlify_plugin_constants.d.ts'
import type { NetlifyPluginUtils } from './options/netlify_plugin_utils.d.ts'
import type { JSONValue } from './utils/json_value.d.ts'
import type { PluginInputs, StringKeys } from './config/inputs.js'
import type { NetlifyConfig } from './config/netlify_config.js'
import type { NetlifyPluginConstants } from './netlify_plugin_constants.js'
import type { NetlifyPluginUtils } from './options/netlify_plugin_utils.js'
import type { JSONValue } from './utils/json_value.js'

export interface NetlifyPluginOptions<TInputs extends PluginInputs<StringKeys<TInputs>> = PluginInputs> {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Many } from '../utils/many.d.ts'
import type { Many } from '../utils/many.js'

/**
* Cache files between builds
Expand Down
12 changes: 6 additions & 6 deletions packages/build/types/options/netlify_plugin_utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { NetlifyPluginBuildUtil } from './netlify_plugin_build_util.d.ts'
import type { NetlifyPluginCacheUtil } from './netlify_plugin_cache_util.d.ts'
import type { NetlifyPluginFunctionsUtil } from './netlify_plugin_functions_util.d.ts'
import type { NetlifyPluginGitUtil } from './netlify_plugin_git_util.d.ts'
import type { NetlifyPluginRunUtil } from './netlify_plugin_run_util.d.ts'
import type { NetlifyPluginStatusUtil } from './netlify_plugin_status_util.d.ts'
import type { NetlifyPluginBuildUtil } from './netlify_plugin_build_util.js'
import type { NetlifyPluginCacheUtil } from './netlify_plugin_cache_util.js'
import type { NetlifyPluginFunctionsUtil } from './netlify_plugin_functions_util.js'
import type { NetlifyPluginGitUtil } from './netlify_plugin_git_util.js'
import type { NetlifyPluginRunUtil } from './netlify_plugin_run_util.js'
import type { NetlifyPluginStatusUtil } from './netlify_plugin_status_util.js'

export interface NetlifyPluginUtils {
build: NetlifyPluginBuildUtil
Expand Down

0 comments on commit 0a72c89

Please sign in to comment.