@granite-js/plugin-core 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.cts +14 -16
- package/dist/index.d.ts +14 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @granite-js/plugin-core
|
|
2
2
|
|
|
3
|
+
## 0.1.31
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9bf8b50: expose resolveRequest option
|
|
8
|
+
- e957833: expose `resolver.resolverMainFields` and `resolver.unstable_conditionNames` options
|
|
9
|
+
- @granite-js/utils@0.1.31
|
|
10
|
+
|
|
3
11
|
## 0.1.30
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -298,19 +298,16 @@ interface ResolutionContext {
|
|
|
298
298
|
readonly resolveHastePackage: (name: string) => string | undefined;
|
|
299
299
|
readonly resolveRequest?: CustomResolver;
|
|
300
300
|
readonly sourceExts: string[];
|
|
301
|
-
readonly unstable_conditionsByPlatform: {
|
|
302
|
-
[platform: string]: string[];
|
|
303
|
-
};
|
|
304
|
-
unstable_conditionNames: string[];
|
|
305
|
-
unstable_enablePackageExports: boolean;
|
|
306
|
-
unstable_getRealPath?: any;
|
|
307
|
-
unstable_logWarning: (message: string) => void;
|
|
308
301
|
}
|
|
309
302
|
interface CustomResolutionContext extends ResolutionContext {
|
|
310
303
|
readonly resolveRequest: CustomResolver;
|
|
311
304
|
}
|
|
312
305
|
type CustomResolver = (context: CustomResolutionContext, moduleName: string, platform: string | null) => any;
|
|
313
306
|
interface ResolverConfig$1 {
|
|
307
|
+
/**
|
|
308
|
+
* Defaults to `['react-native', 'browser', 'main']`
|
|
309
|
+
*/
|
|
310
|
+
resolverMainFields: string[];
|
|
314
311
|
assetExts: string[];
|
|
315
312
|
assetResolutions: string[];
|
|
316
313
|
blacklistRE?: RegExp | RegExp[];
|
|
@@ -326,14 +323,7 @@ interface ResolverConfig$1 {
|
|
|
326
323
|
nodeModulesPaths: string[];
|
|
327
324
|
platforms: string[];
|
|
328
325
|
resolveRequest?: CustomResolver;
|
|
329
|
-
resolverMainFields: string[];
|
|
330
326
|
sourceExts: string[];
|
|
331
|
-
unstable_enableSymlinks: boolean;
|
|
332
|
-
unstable_conditionNames: string[];
|
|
333
|
-
unstable_conditionsByPlatform: Readonly<{
|
|
334
|
-
[platform: string]: string[];
|
|
335
|
-
}>;
|
|
336
|
-
unstable_enablePackageExports: boolean;
|
|
337
327
|
useWatchman: boolean;
|
|
338
328
|
requireCycleIgnorePatterns: ReadonlyArray<RegExp>;
|
|
339
329
|
}
|
|
@@ -486,8 +476,16 @@ interface AdditionalMetroConfig extends MetroConfig {
|
|
|
486
476
|
* Partial support for some options only
|
|
487
477
|
*
|
|
488
478
|
* - `blockList`
|
|
479
|
+
* - `resolverMainFields`
|
|
480
|
+
* - `resolveRequest`
|
|
481
|
+
* - `conditionNames`
|
|
489
482
|
*/
|
|
490
|
-
resolver?: MetroConfig['resolver']
|
|
483
|
+
resolver?: MetroConfig['resolver'] & {
|
|
484
|
+
/**
|
|
485
|
+
* Defaults to `['react-native', 'require', 'node', 'default']`
|
|
486
|
+
*/
|
|
487
|
+
conditionNames?: string[];
|
|
488
|
+
};
|
|
491
489
|
reporter?: MetroConfig['reporter'];
|
|
492
490
|
babelConfig?: babel.TransformOptions;
|
|
493
491
|
transformSync?: (id: string, code: string) => string;
|
|
@@ -729,4 +727,4 @@ interface LoadConfigOptions {
|
|
|
729
727
|
declare const loadConfig: (options?: LoadConfigOptions) => Promise<CompleteGraniteConfig>;
|
|
730
728
|
|
|
731
729
|
//#endregion
|
|
732
|
-
export { AdditionalMetroConfig, AliasConfig, AliasResolver, BabelConfig, BuildConfig, BuildFailureResult, BuildResult, BuildSuccessResult, BundleData, CompleteGraniteConfig, DevServerConfig, DynamicPluginConfig, EsbuildConfig, GraniteConfig, GranitePlugin, GranitePluginBuildPostHandler, GranitePluginBuildPreHandler, GranitePluginConfig, GranitePluginCore, GranitePluginDevHandlerArgs, GranitePluginDevPostHandler, GranitePluginDevPreHandler, GranitePluginHooks, GranitePluginPostHandlerArgs, GranitePluginPreHandlerArgs, InspectorProxyConfig, MetroDevServerConfig, MetroMiddleware, Middleware, ParsedGraniteConfig, PluginBuildConfig, PluginConfig, PluginContext, PluginInput, PluginMetroConfig, PluginResolvable, ProtocolConfig, ResolveResult, ResolveResultWithOptions, ResolvedMetroConfig, ResolvedPluginConfig, ResolverConfig, StaticPluginConfig, SwcConfig, TransformAsync, TransformSync, TransformerConfig, createContext, createPluginContext, createPluginHooksDriver, defineConfig, flattenPlugins, isBuildFailure, isBuildSuccess, loadConfig, mergeBuildConfigs, mergeConfig, pluginConfigSchema, resolveConfig, resolvePlugins };
|
|
730
|
+
export { AdditionalMetroConfig, AliasConfig, AliasResolver, BabelConfig, BuildConfig, BuildFailureResult, BuildResult, BuildSuccessResult, BundleData, CompleteGraniteConfig, DevServerConfig, DynamicPluginConfig, EsbuildConfig, GraniteConfig, GranitePlugin, GranitePluginBuildPostHandler, GranitePluginBuildPreHandler, GranitePluginConfig, GranitePluginCore, GranitePluginDevHandlerArgs, GranitePluginDevPostHandler, GranitePluginDevPreHandler, GranitePluginHooks, GranitePluginPostHandlerArgs, GranitePluginPreHandlerArgs, InspectorProxyConfig, MetroDevServerConfig, MetroMiddleware, ResolutionContext as MetroResolutionContext, Middleware, ParsedGraniteConfig, PluginBuildConfig, PluginConfig, PluginContext, PluginInput, PluginMetroConfig, PluginResolvable, ProtocolConfig, ResolveResult, ResolveResultWithOptions, ResolvedMetroConfig, ResolvedPluginConfig, ResolverConfig, StaticPluginConfig, SwcConfig, TransformAsync, TransformSync, TransformerConfig, createContext, createPluginContext, createPluginHooksDriver, defineConfig, flattenPlugins, isBuildFailure, isBuildSuccess, loadConfig, mergeBuildConfigs, mergeConfig, pluginConfigSchema, resolveConfig, resolvePlugins };
|
package/dist/index.d.ts
CHANGED
|
@@ -298,19 +298,16 @@ interface ResolutionContext {
|
|
|
298
298
|
readonly resolveHastePackage: (name: string) => string | undefined;
|
|
299
299
|
readonly resolveRequest?: CustomResolver;
|
|
300
300
|
readonly sourceExts: string[];
|
|
301
|
-
readonly unstable_conditionsByPlatform: {
|
|
302
|
-
[platform: string]: string[];
|
|
303
|
-
};
|
|
304
|
-
unstable_conditionNames: string[];
|
|
305
|
-
unstable_enablePackageExports: boolean;
|
|
306
|
-
unstable_getRealPath?: any;
|
|
307
|
-
unstable_logWarning: (message: string) => void;
|
|
308
301
|
}
|
|
309
302
|
interface CustomResolutionContext extends ResolutionContext {
|
|
310
303
|
readonly resolveRequest: CustomResolver;
|
|
311
304
|
}
|
|
312
305
|
type CustomResolver = (context: CustomResolutionContext, moduleName: string, platform: string | null) => any;
|
|
313
306
|
interface ResolverConfig$1 {
|
|
307
|
+
/**
|
|
308
|
+
* Defaults to `['react-native', 'browser', 'main']`
|
|
309
|
+
*/
|
|
310
|
+
resolverMainFields: string[];
|
|
314
311
|
assetExts: string[];
|
|
315
312
|
assetResolutions: string[];
|
|
316
313
|
blacklistRE?: RegExp | RegExp[];
|
|
@@ -326,14 +323,7 @@ interface ResolverConfig$1 {
|
|
|
326
323
|
nodeModulesPaths: string[];
|
|
327
324
|
platforms: string[];
|
|
328
325
|
resolveRequest?: CustomResolver;
|
|
329
|
-
resolverMainFields: string[];
|
|
330
326
|
sourceExts: string[];
|
|
331
|
-
unstable_enableSymlinks: boolean;
|
|
332
|
-
unstable_conditionNames: string[];
|
|
333
|
-
unstable_conditionsByPlatform: Readonly<{
|
|
334
|
-
[platform: string]: string[];
|
|
335
|
-
}>;
|
|
336
|
-
unstable_enablePackageExports: boolean;
|
|
337
327
|
useWatchman: boolean;
|
|
338
328
|
requireCycleIgnorePatterns: ReadonlyArray<RegExp>;
|
|
339
329
|
}
|
|
@@ -486,8 +476,16 @@ interface AdditionalMetroConfig extends MetroConfig {
|
|
|
486
476
|
* Partial support for some options only
|
|
487
477
|
*
|
|
488
478
|
* - `blockList`
|
|
479
|
+
* - `resolverMainFields`
|
|
480
|
+
* - `resolveRequest`
|
|
481
|
+
* - `conditionNames`
|
|
489
482
|
*/
|
|
490
|
-
resolver?: MetroConfig['resolver']
|
|
483
|
+
resolver?: MetroConfig['resolver'] & {
|
|
484
|
+
/**
|
|
485
|
+
* Defaults to `['react-native', 'require', 'node', 'default']`
|
|
486
|
+
*/
|
|
487
|
+
conditionNames?: string[];
|
|
488
|
+
};
|
|
491
489
|
reporter?: MetroConfig['reporter'];
|
|
492
490
|
babelConfig?: babel.TransformOptions;
|
|
493
491
|
transformSync?: (id: string, code: string) => string;
|
|
@@ -729,4 +727,4 @@ interface LoadConfigOptions {
|
|
|
729
727
|
declare const loadConfig: (options?: LoadConfigOptions) => Promise<CompleteGraniteConfig>;
|
|
730
728
|
|
|
731
729
|
//#endregion
|
|
732
|
-
export { AdditionalMetroConfig, AliasConfig, AliasResolver, BabelConfig, BuildConfig, BuildFailureResult, BuildResult, BuildSuccessResult, BundleData, CompleteGraniteConfig, DevServerConfig, DynamicPluginConfig, EsbuildConfig, GraniteConfig, GranitePlugin, GranitePluginBuildPostHandler, GranitePluginBuildPreHandler, GranitePluginConfig, GranitePluginCore, GranitePluginDevHandlerArgs, GranitePluginDevPostHandler, GranitePluginDevPreHandler, GranitePluginHooks, GranitePluginPostHandlerArgs, GranitePluginPreHandlerArgs, InspectorProxyConfig, MetroDevServerConfig, MetroMiddleware, Middleware, ParsedGraniteConfig, PluginBuildConfig, PluginConfig, PluginContext, PluginInput, PluginMetroConfig, PluginResolvable, ProtocolConfig, ResolveResult, ResolveResultWithOptions, ResolvedMetroConfig, ResolvedPluginConfig, ResolverConfig, StaticPluginConfig, SwcConfig, TransformAsync, TransformSync, TransformerConfig, createContext, createPluginContext, createPluginHooksDriver, defineConfig, flattenPlugins, isBuildFailure, isBuildSuccess, loadConfig, mergeBuildConfigs, mergeConfig, pluginConfigSchema, resolveConfig, resolvePlugins };
|
|
730
|
+
export { AdditionalMetroConfig, AliasConfig, AliasResolver, BabelConfig, BuildConfig, BuildFailureResult, BuildResult, BuildSuccessResult, BundleData, CompleteGraniteConfig, DevServerConfig, DynamicPluginConfig, EsbuildConfig, GraniteConfig, GranitePlugin, GranitePluginBuildPostHandler, GranitePluginBuildPreHandler, GranitePluginConfig, GranitePluginCore, GranitePluginDevHandlerArgs, GranitePluginDevPostHandler, GranitePluginDevPreHandler, GranitePluginHooks, GranitePluginPostHandlerArgs, GranitePluginPreHandlerArgs, InspectorProxyConfig, MetroDevServerConfig, MetroMiddleware, ResolutionContext as MetroResolutionContext, Middleware, ParsedGraniteConfig, PluginBuildConfig, PluginConfig, PluginContext, PluginInput, PluginMetroConfig, PluginResolvable, ProtocolConfig, ResolveResult, ResolveResultWithOptions, ResolvedMetroConfig, ResolvedPluginConfig, ResolverConfig, StaticPluginConfig, SwcConfig, TransformAsync, TransformSync, TransformerConfig, createContext, createPluginContext, createPluginHooksDriver, defineConfig, flattenPlugins, isBuildFailure, isBuildSuccess, loadConfig, mergeBuildConfigs, mergeConfig, pluginConfigSchema, resolveConfig, resolvePlugins };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@granite-js/plugin-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.31",
|
|
5
5
|
"description": "The core plugin module for Granite",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"vitest": "^3.0.9"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@granite-js/utils": "0.1.
|
|
43
|
+
"@granite-js/utils": "0.1.31",
|
|
44
44
|
"@swc/core": "1.5.24",
|
|
45
45
|
"@types/babel__core": "^7",
|
|
46
46
|
"@types/connect": "^3",
|