Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rsbuild/shared

Package Overview
Dependencies
Maintainers
3
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rsbuild/shared - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

3

dist/createContext.d.ts

@@ -1,2 +0,2 @@

import { Context, SourceConfig, OutputConfig, CreateRsbuildOptions, BundlerType } from './types';
import type { Context, BundlerType, SourceConfig, OutputConfig, NormalizedConfig, CreateRsbuildOptions } from './types';
/**

@@ -6,2 +6,3 @@ * Create context by config.

export declare function createContextByConfig(options: Required<CreateRsbuildOptions>, bundlerType: BundlerType, sourceConfig?: SourceConfig, outputConfig?: OutputConfig): Context;
export declare function updateContextByNormalizedConfig(context: Context, config: NormalizedConfig): void;
export declare function createPublicContext(context: Context): Readonly<Context>;

@@ -22,3 +22,4 @@ "use strict";

createContextByConfig: () => createContextByConfig,
createPublicContext: () => createPublicContext
createPublicContext: () => createPublicContext,
updateContextByNormalizedConfig: () => updateContextByNormalizedConfig
});

@@ -47,5 +48,3 @@ module.exports = __toCommonJS(createContext_exports);

}
throw new Error(
"Could not find the entry file, please make sure that `src/index.(ts|js|tsx|jsx|mjs|cjs)` exists, or customize entry through the `source.entry` configuration."
);
return {};
}

@@ -55,3 +54,2 @@ function createContextByConfig(options, bundlerType, sourceConfig = {}, outputConfig = {}) {

const rootPath = cwd;
const srcPath = (0, import_path.join)(rootPath, "src");
const distPath = (0, import_fs2.getAbsoluteDistPath)(cwd, outputConfig);

@@ -72,3 +70,2 @@ const cachePath = (0, import_path.join)(rootPath, "node_modules", ".cache");

target,
srcPath,
rootPath,

@@ -84,2 +81,8 @@ distPath,

}
function updateContextByNormalizedConfig(context, config) {
context.distPath = (0, import_fs2.getAbsoluteDistPath)(context.rootPath, config.output);
if (config.source.entry) {
context.entry = config.source.entry;
}
}
function createPublicContext(context) {

@@ -89,3 +92,2 @@ const exposedKeys = [

"target",
"srcPath",
"rootPath",

@@ -106,3 +108,3 @@ "distPath",

},
set(target, prop) {
set(_, prop) {
import_logger.logger.error(

@@ -118,3 +120,4 @@ `Context is readonly, you can not assign to the "context.${prop}" prop.`

createContextByConfig,
createPublicContext
createPublicContext,
updateContextByNormalizedConfig
});

@@ -9,2 +9,3 @@ import type { DevConfig, NormalizedDevConfig } from './dev';

import type { DeepReadonly } from '../utils';
import type { RsbuildPlugin } from '..';
/**

@@ -22,2 +23,3 @@ * The shared Rsbuild config.

performance?: PerformanceConfig;
plugins?: RsbuildPlugin[];
}

@@ -32,2 +34,3 @@ export type NormalizedConfig = DeepReadonly<{

performance: NormalizedPerformanceConfig;
plugins?: RsbuildPlugin[];
}>;

@@ -34,0 +37,0 @@ export * from './dev';

@@ -11,4 +11,2 @@ import type { RsbuildEntry, RsbuildTarget } from './rsbuild';

rootPath: string;
/** Absolute path of source files. */
srcPath: string;
/** Absolute path of output files. */

@@ -15,0 +13,0 @@ distPath: string;

{
"name": "@rsbuild/shared",
"version": "0.0.23",
"version": "0.0.24",
"description": "The shared modules and dependencies of Rsbuild.",

@@ -93,3 +93,3 @@ "homepage": "https://rsbuild.dev",

"dependencies": {
"@rspack/core": "0.3.12",
"@rspack/core": "0.3.13",
"caniuse-lite": "^1.0.30001559",

@@ -103,3 +103,3 @@ "json5": "^2.2.3",

"devDependencies": {
"@rspack/core": "0.3.12",
"@rspack/core": "0.3.13",
"@types/lodash": "^4.14.200",

@@ -106,0 +106,0 @@ "@types/node": "^16",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc