@umijs/bundler-esbuild 4.6.67 → 4.6.68

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.
@@ -1,3 +1,3 @@
1
1
  import { Plugin } from '@umijs/bundler-utils/compiled/esbuild';
2
- declare const _default: (options?: Record<string, string>) => Plugin;
3
2
  export default _default;
3
+ declare function _default(options?: Record<string, string>): Plugin;
@@ -1,3 +1,3 @@
1
1
  import { Plugin } from '@umijs/bundler-utils/compiled/esbuild';
2
- declare const _default: (options?: Record<string, string>) => Plugin;
3
2
  export default _default;
3
+ declare function _default(options?: Record<string, string>): Plugin;
@@ -1,9 +1,9 @@
1
1
  import { Plugin } from '@umijs/bundler-utils/compiled/esbuild';
2
2
  import { IConfig } from '../types';
3
3
  export declare const aliasLessImportPath: (filePath: string, alias: Record<string, string>, importer: string) => Promise<string | null>;
4
- declare const _default: (options?: Less.Options & {
4
+ export default _default;
5
+ declare function _default(options?: Less.Options & {
5
6
  alias?: Record<string, string>;
6
7
  inlineStyle?: boolean;
7
8
  config?: IConfig;
8
- }) => Plugin;
9
- export default _default;
9
+ }): Plugin;
@@ -25,8 +25,10 @@ module.exports = __toCommonJS(watchRebuild_exports);
25
25
  function failureErrorWithLog(text, errors, warnings) {
26
26
  let limit = 5;
27
27
  let summary = errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
28
- if (i === limit) return "\n...";
29
- if (!e.location) return `
28
+ if (i === limit)
29
+ return "\n...";
30
+ if (!e.location)
31
+ return `
30
32
  error: ${e.text}`;
31
33
  let { file, line, column } = e.location;
32
34
  let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : "";
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@ export interface ICopy {
12
12
  from: string;
13
13
  to: string;
14
14
  }
15
- export declare type IBabelPlugin = Function | string | [string, {
15
+ export type IBabelPlugin = Function | string | [string, {
16
16
  [key: string]: any;
17
17
  }] | [string, {
18
18
  [key: string]: any;
@@ -24,10 +24,14 @@ __export(sortByAffix_exports, {
24
24
  module.exports = __toCommonJS(sortByAffix_exports);
25
25
  function sortByAffix(opts) {
26
26
  return opts.arr.sort((a, b) => {
27
- if (a.endsWith(opts.affix) && b.endsWith(opts.affix)) return 0;
28
- if (a.endsWith(opts.affix)) return -1;
29
- if (b.endsWith(opts.affix)) return 1;
30
- else return 0;
27
+ if (a.endsWith(opts.affix) && b.endsWith(opts.affix))
28
+ return 0;
29
+ if (a.endsWith(opts.affix))
30
+ return -1;
31
+ if (b.endsWith(opts.affix))
32
+ return 1;
33
+ else
34
+ return 0;
31
35
  });
32
36
  }
33
37
  // Annotate the CommonJS export names for ESM import in node:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-esbuild",
3
- "version": "4.6.67",
3
+ "version": "4.6.68",
4
4
  "description": "@umijs/bundler-esbuild",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-esbuild#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -22,8 +22,8 @@
22
22
  "postcss": "^8.4.21",
23
23
  "postcss-flexbugs-fixes": "5.0.2",
24
24
  "postcss-preset-env": "7.5.0",
25
- "@umijs/bundler-utils": "4.6.67",
26
- "@umijs/utils": "4.6.67"
25
+ "@umijs/bundler-utils": "4.6.68",
26
+ "@umijs/utils": "4.6.68"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@alitajs/postcss-plugin-px2rem": "^0.0.1"