miqro 7.0.6 → 7.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.
@@ -7,6 +7,7 @@ export declare function esBuild(options: {
7
7
  entryPoints: [string];
8
8
  mainFields?: string;
9
9
  bundle?: boolean;
10
+ keepNames?: boolean;
10
11
  jsxFactory?: string;
11
12
  jsxFragment?: string;
12
13
  minify?: boolean;
@@ -50,7 +50,7 @@ export async function esBuild(options, logger) {
50
50
  try {
51
51
  //const logger = getLogger(`${SERVER_IDENTIFIER}_ESBUILD`);
52
52
  const valid = await validateESBuild(logger);
53
- const esBuildCMD = `${getESBuildBinaryPath()} "${options.entryPoints[0]}" ${(options.external ? options.external : NODEJS_EXTERNAL).map(e => `--external:${e}`).join(" ")} --loader:.js=jsx --jsx-factory=${options.jsxFactory} --jsx-fragment=${options.jsxFragment} ${options.bundle ? " --bundle" : ""}${options.minify ? " --minify" : ""}${options.outfile ? ` --outfile="${options.outfile}"` : ""}${options.platform ? ` --platform=${options.platform}` : ""}${options.mainFields ? ` --main-fields=${options.mainFields}` : ""}`;
53
+ const esBuildCMD = `${getESBuildBinaryPath()} "${options.entryPoints[0]}" ${(options.external ? options.external : NODEJS_EXTERNAL).map(e => `--external:${e}`).join(" ")} --loader:.js=jsx --jsx-factory=${options.jsxFactory} --jsx-fragment=${options.jsxFragment} ${options.bundle ? " --bundle" : ""}${options.minify ? " --minify" : ""}${options.outfile ? ` --outfile="${options.outfile}"` : ""}${options.platform ? ` --platform=${options.platform}` : ""}${options.mainFields ? ` --main-fields=${options.mainFields}` : ""}${options.keepNames ? ` --keep-names` : ""}`;
54
54
  logger?.trace(esBuildCMD);
55
55
  if (!valid) {
56
56
  const err = new Error(`esbuild installation at [${getESBuildBinaryPath()}] tampered`);
@@ -15,6 +15,7 @@ const parser = new Parser();
15
15
  const DEFAULT_ESOPTION = {
16
16
  platform: "neutral",
17
17
  mainFields: "module,main",
18
+ keepNames: true,
18
19
  // platform: "node",
19
20
  bundle: true,
20
21
  jsxFactory: "JSX.createElement",
package/build/lib.cjs CHANGED
@@ -9361,7 +9361,7 @@ async function esBuild2(options, logger) {
9361
9361
  return new Promise(async (resolve24, reject) => {
9362
9362
  try {
9363
9363
  const valid = await validateESBuild(logger);
9364
- const esBuildCMD = `${getESBuildBinaryPath()} "${options.entryPoints[0]}" ${(options.external ? options.external : NODEJS_EXTERNAL).map((e) => `--external:${e}`).join(" ")} --loader:.js=jsx --jsx-factory=${options.jsxFactory} --jsx-fragment=${options.jsxFragment} ${options.bundle ? " --bundle" : ""}${options.minify ? " --minify" : ""}${options.outfile ? ` --outfile="${options.outfile}"` : ""}${options.platform ? ` --platform=${options.platform}` : ""}${options.mainFields ? ` --main-fields=${options.mainFields}` : ""}`;
9364
+ const esBuildCMD = `${getESBuildBinaryPath()} "${options.entryPoints[0]}" ${(options.external ? options.external : NODEJS_EXTERNAL).map((e) => `--external:${e}`).join(" ")} --loader:.js=jsx --jsx-factory=${options.jsxFactory} --jsx-fragment=${options.jsxFragment} ${options.bundle ? " --bundle" : ""}${options.minify ? " --minify" : ""}${options.outfile ? ` --outfile="${options.outfile}"` : ""}${options.platform ? ` --platform=${options.platform}` : ""}${options.mainFields ? ` --main-fields=${options.mainFields}` : ""}${options.keepNames ? ` --keep-names` : ""}`;
9365
9365
  logger?.trace(esBuildCMD);
9366
9366
  if (!valid) {
9367
9367
  const err = new Error(`esbuild installation at [${getESBuildBinaryPath()}] tampered`);
@@ -9409,6 +9409,7 @@ var parser = new Parser();
9409
9409
  var DEFAULT_ESOPTION = {
9410
9410
  platform: "neutral",
9411
9411
  mainFields: "module,main",
9412
+ keepNames: true,
9412
9413
  // platform: "node",
9413
9414
  bundle: true,
9414
9415
  jsxFactory: "JSX.createElement",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miqro",
3
- "version": "7.0.6",
3
+ "version": "7.0.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "build/esm/src/lib.js",
@@ -57,6 +57,7 @@ export async function esBuild(options: {
57
57
  entryPoints: [string];
58
58
  mainFields?: string;
59
59
  bundle?: boolean;
60
+ keepNames?: boolean;
60
61
  jsxFactory?: string;
61
62
  jsxFragment?: string;
62
63
  minify?: boolean;
@@ -72,7 +73,7 @@ export async function esBuild(options: {
72
73
  try {
73
74
  //const logger = getLogger(`${SERVER_IDENTIFIER}_ESBUILD`);
74
75
  const valid = await validateESBuild(logger);
75
- const esBuildCMD = `${getESBuildBinaryPath()} "${options.entryPoints[0]}" ${(options.external ? options.external : NODEJS_EXTERNAL).map(e => `--external:${e}`).join(" ")} --loader:.js=jsx --jsx-factory=${options.jsxFactory} --jsx-fragment=${options.jsxFragment} ${options.bundle ? " --bundle" : ""}${options.minify ? " --minify" : ""}${options.outfile ? ` --outfile="${options.outfile}"` : ""}${options.platform ? ` --platform=${options.platform}` : ""}${options.mainFields ? ` --main-fields=${options.mainFields}` : ""}`;
76
+ const esBuildCMD = `${getESBuildBinaryPath()} "${options.entryPoints[0]}" ${(options.external ? options.external : NODEJS_EXTERNAL).map(e => `--external:${e}`).join(" ")} --loader:.js=jsx --jsx-factory=${options.jsxFactory} --jsx-fragment=${options.jsxFragment} ${options.bundle ? " --bundle" : ""}${options.minify ? " --minify" : ""}${options.outfile ? ` --outfile="${options.outfile}"` : ""}${options.platform ? ` --platform=${options.platform}` : ""}${options.mainFields ? ` --main-fields=${options.mainFields}` : ""}${options.keepNames ? ` --keep-names` : ""}`;
76
77
  logger?.trace(esBuildCMD);
77
78
  if (!valid) {
78
79
  const err = new Error(`esbuild installation at [${getESBuildBinaryPath()}] tampered`);
package/src/common/jsx.ts CHANGED
@@ -59,6 +59,7 @@ export interface InflateOptions {
59
59
  const DEFAULT_ESOPTION = {
60
60
  platform: "neutral",
61
61
  mainFields: "module,main",
62
+ keepNames: true,
62
63
  // platform: "node",
63
64
  bundle: true,
64
65
  jsxFactory: "JSX.createElement",