@rslib/core 0.0.5 → 0.0.7

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.
@@ -20,6 +20,7 @@ export declare const composeAutoExternalConfig: (options: {
20
20
  }) => RsbuildConfig;
21
21
  export declare function composeMinifyConfig(minify: NonNullable<RsbuildConfig['output']>['minify']): RsbuildConfig;
22
22
  export declare function composeBannerFooterConfig(banner: BannerAndFooter, footer: BannerAndFooter): RsbuildConfig;
23
+ export declare function composeDecoratorsConfig(compilerOptions?: Record<string, any>, version?: NonNullable<NonNullable<RsbuildConfig['source']>['decorators']>['version']): RsbuildConfig;
23
24
  export declare function createConstantRsbuildConfig(): Promise<RsbuildConfig>;
24
25
  export declare const composeModuleImportWarn: (request: string) => string;
25
26
  export declare function composeCreateRsbuildConfig(rslibConfig: RslibConfig, path?: string): Promise<{
@@ -1,3 +1,8 @@
1
1
  export declare const DEFAULT_CONFIG_NAME = "rslib.config";
2
- export declare const DEFAULT_EXTENSIONS: readonly [".js", ".ts", ".mjs", ".mts", ".cjs", ".cts"];
2
+ export declare const DEFAULT_CONFIG_EXTENSIONS: readonly [".js", ".ts", ".mjs", ".mts", ".cjs", ".cts"];
3
3
  export declare const SWC_HELPERS = "@swc/helpers";
4
+ export declare const JS_EXTENSIONS: string[];
5
+ export declare const CSS_EXTENSIONS: string[];
6
+ export declare const ENTRY_EXTENSIONS: string[];
7
+ export declare const JS_EXTENSIONS_PATTERN: RegExp;
8
+ export declare const ENTRY_EXTENSIONS_PATTERN: RegExp;
@@ -0,0 +1,2 @@
1
+ import { type RsbuildPlugin } from '@rsbuild/core';
2
+ export declare const pluginCjsShim: () => RsbuildPlugin;
@@ -1,6 +1,9 @@
1
1
  import type { RsbuildConfig } from '@rsbuild/core';
2
2
  export type Format = 'esm' | 'cjs' | 'umd';
3
- export type EcmaScriptVersion = 'esnext' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'es2024';
3
+ export type FixedEcmaVersions = 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023';
4
+ export type LatestEcmaVersions = 'es2024' | 'esnext';
5
+ export type EcmaScriptVersion = FixedEcmaVersions | LatestEcmaVersions;
6
+ export type RsbuildConfigOutputTarget = NonNullable<RsbuildConfig['output']>['target'];
4
7
  export type Syntax = EcmaScriptVersion | string[];
5
8
  export type Dts = {
6
9
  bundle: boolean;
@@ -1,3 +1,12 @@
1
1
  import type { RsbuildConfig } from '@rsbuild/core';
2
- import type { Syntax } from '../types/config';
3
- export declare const transformSyntaxToBrowserslist: (syntax: Syntax) => NonNullable<NonNullable<RsbuildConfig["output"]>["overrideBrowserslist"]>;
2
+ import type { FixedEcmaVersions, LatestEcmaVersions, RsbuildConfigOutputTarget, Syntax } from '../types/config';
3
+ export declare const LATEST_TARGET_VERSIONS: Record<NonNullable<RsbuildConfigOutputTarget>, string[]>;
4
+ /**
5
+ * The esX to browserslist mapping is transformed from esbuild:
6
+ * https://github.com/evanw/esbuild/blob/main/internal/compat/js_table.go
7
+ * It does not completely align with the browserslist query of Rsbuild now:
8
+ * https://github.com/rspack-contrib/browserslist-to-es-version
9
+ * TODO: align with Rsbuild, we may should align with SWC
10
+ */
11
+ export declare const ESX_TO_BROWSERSLIST: Record<FixedEcmaVersions, Record<string, string | string[]>> & Record<LatestEcmaVersions, (target: RsbuildConfigOutputTarget) => string[]>;
12
+ export declare function transformSyntaxToBrowserslist(syntax: Syntax, target?: NonNullable<RsbuildConfig['output']>['target']): NonNullable<NonNullable<RsbuildConfig['output']>['overrideBrowserslist']>;
@@ -0,0 +1,3 @@
1
+ export declare function loadTsconfig(root: string, tsconfigPath?: string): Promise<{
2
+ compilerOptions?: Record<string, any>;
3
+ }>;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@rslib/core",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "The Rspack-based library build tool.",
5
- "homepage": "https://rslib.dev",
5
+ "homepage": "https://lib.rsbuild.dev",
6
6
  "bugs": {
7
7
  "url": "https://github.com/web-infra-dev/rslib/issues"
8
8
  },
@@ -32,20 +32,21 @@
32
32
  "compiled"
33
33
  ],
34
34
  "dependencies": {
35
- "@rsbuild/core": "1.0.1-rc.4",
36
- "rsbuild-plugin-dts": "0.0.5"
35
+ "@rsbuild/core": "1.0.5",
36
+ "rsbuild-plugin-dts": "0.0.7"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/fs-extra": "^11.0.4",
40
40
  "commander": "^12.1.0",
41
41
  "fast-glob": "^3.3.2",
42
42
  "fs-extra": "^11.2.0",
43
- "memfs": "^4.11.1",
43
+ "memfs": "^4.12.0",
44
44
  "picocolors": "1.1.0",
45
45
  "prebundle": "1.2.2",
46
- "rslib": "npm:@rslib/core@0.0.4",
46
+ "rslib": "npm:@rslib/core@0.0.6",
47
47
  "rslog": "^1.2.3",
48
- "typescript": "^5.5.4",
48
+ "tsconfck": "3.1.3",
49
+ "typescript": "^5.6.2",
49
50
  "@rslib/tsconfig": "0.0.1"
50
51
  },
51
52
  "peerDependencies": {