@ms-cloudpack/bundler-rollup 0.2.10 → 0.2.12
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,7 +7,17 @@ declare function commonjs(options?: {}): {
|
|
|
7
7
|
plugins: any;
|
|
8
8
|
}): void;
|
|
9
9
|
buildEnd(): void;
|
|
10
|
-
load(id: any):
|
|
10
|
+
load(id: any): string | Promise<string> | {
|
|
11
|
+
code: string;
|
|
12
|
+
syntheticNamedExports: string;
|
|
13
|
+
} | {
|
|
14
|
+
code: string;
|
|
15
|
+
meta: {
|
|
16
|
+
commonjs: {
|
|
17
|
+
isCommonJS: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
} | null;
|
|
11
21
|
shouldTransformCachedModule(...args: any[]): any;
|
|
12
22
|
transform(code: any, id: any): any;
|
|
13
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/commonjs/index.js"],"names":[],"mappings":";AA05DA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/commonjs/index.js"],"names":[],"mappings":";AA05DA;;;;;;;;;;;;;;;;;;;;;EAsQC"}
|
package/lib/rollup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,OAAO,EAA8B,MAAM,4BAA4B,CAAC;AAYrG,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,OAAO,EAA8B,MAAM,4BAA4B,CAAC;AAYrG,eAAO,MAAM,MAAM,EAAE,OAuDpB,CAAC"}
|
package/lib/rollup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { processCapabilities } from '@ms-cloudpack/bundler-capabilities';
|
|
2
2
|
import { writeESMStubsInWorker } from '@ms-cloudpack/esm-stub-utilities';
|
|
3
|
-
import { rollup as runRollup } from 'rollup';
|
|
3
|
+
import { rollup as runRollup, VERSION } from 'rollup';
|
|
4
4
|
import { getRollupOptions } from './getRollupOptions.js';
|
|
5
5
|
import { normalizeRollupLoc } from './normalizeRollupLoc.js';
|
|
6
6
|
import { normalizeRollupOutput } from './normalizeRollupOutput.js';
|
|
@@ -9,6 +9,7 @@ import { base64AssetExtensions } from '@ms-cloudpack/bundler-utilities';
|
|
|
9
9
|
const bundlerName = 'rollup';
|
|
10
10
|
export const rollup = {
|
|
11
11
|
name: bundlerName,
|
|
12
|
+
version: VERSION,
|
|
12
13
|
bundle: async function (options, context) {
|
|
13
14
|
const { newEntries, errors } = await writeESMStubsInWorker(options);
|
|
14
15
|
if (errors?.length) {
|
package/lib/rollup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,SAAS,EAAuC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["../src/rollup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,SAAS,EAAuC,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7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;YACX,iGAAiG;YACjG,MAAM,KAAK,GAAG,CAAgB,CAAC;YAC/B,MAAM,YAAY,GAAkB;gBAClC,IAAI,EAAE,KAAK,CAAC,OAAO;gBACnB,oCAAoC;gBACpC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACzG,MAAM,EAAE,QAAQ;aACjB,CAAC;YAEF,IAAI,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;gBAChC,YAAY,CAAC,QAAQ,GAAG,kBAAkB,CAAC;oBACzC,2CAA2C;oBAC3C,GAAG,EAAE,KAAK,CAAC,GAAG;oBACd,sCAAsC;oBACtC,EAAE,EAAE,KAAK,CAAC,EAAE;oBACZ,SAAS,EAAE,OAAO,CAAC,SAAS;iBAC7B,CAAC,CAAC;YACL,CAAC;YAED,OAAO,EAAE,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;QACpC,CAAC;QAED,OAAO,qBAAqB,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF,CAAC","sourcesContent":["import type { BundleMessage, Bundler, BundlerCapabilitiesOptions } from '@ms-cloudpack/common-types';\nimport { processCapabilities } from '@ms-cloudpack/bundler-capabilities';\nimport { writeESMStubsInWorker } from '@ms-cloudpack/esm-stub-utilities';\nimport { rollup as runRollup, type RollupError, type RollupOutput, VERSION } from 'rollup';\nimport { getRollupOptions } from './getRollupOptions.js';\nimport { normalizeRollupLoc } from './normalizeRollupLoc.js';\nimport { normalizeRollupOutput } from './normalizeRollupOutput.js';\nimport { rollupCapabilities } from './rollupCapabilities.js';\nimport { base64AssetExtensions } from '@ms-cloudpack/bundler-utilities';\n\nconst bundlerName = 'rollup';\n\nexport const rollup: Bundler = {\n name: bundlerName,\n version: VERSION,\n bundle: async function (options, context) {\n const { newEntries, errors } = await writeESMStubsInWorker(options);\n if (errors?.length) {\n return { errors };\n }\n\n const { warnings, ...baseConfig } = await getRollupOptions({ options, newEntries });\n\n const bundlerCapabilitiesOptions: BundlerCapabilitiesOptions = {\n 'asset-inline': { extensions: base64AssetExtensions },\n ...(options.bundlerCapabilities || {}),\n };\n\n const { inputOptions, outputOptions } = await processCapabilities({\n bundlerName,\n baseConfig,\n bundlerCapabilitiesOptions,\n internalCapabilities: rollupCapabilities,\n bundlerCapabilitiesRegistry: context.config.bundlerCapabilitiesRegistry,\n });\n\n let output: RollupOutput;\n\n try {\n const result = await runRollup(inputOptions);\n output = await result.write(outputOptions);\n await result.close();\n } catch (e) {\n // This might only be a regular Error, but the extra RollupError properties accessed are optional\n const error = e as RollupError;\n const errorMessage: BundleMessage = {\n text: error.message,\n // remove the message from the stack\n notes: [{ text: error.stack?.includes(error.message) ? error.stack.split(error.message)[1].trim() : '' }],\n source: 'rollup',\n };\n\n if (error.id || error.loc?.file) {\n errorMessage.location = normalizeRollupLoc({\n // contains line, column, and possibly file\n loc: error.loc,\n // some errors only have the file here\n id: error.id,\n inputPath: options.inputPath,\n });\n }\n\n return { errors: [errorMessage] };\n }\n\n return normalizeRollupOutput({ options, inputOptions, outputOptions, output, warnings });\n },\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/bundler-rollup",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "A cloudpack plugin for abstracting rollup.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ms-cloudpack/bundler-capabilities": "^0.2.
|
|
23
|
-
"@ms-cloudpack/bundler-utilities": "^0.1.
|
|
24
|
-
"@ms-cloudpack/common-types": "^0.24.
|
|
25
|
-
"@ms-cloudpack/esm-stub-utilities": "^0.14.
|
|
26
|
-
"@ms-cloudpack/package-utilities": "^11.3.
|
|
22
|
+
"@ms-cloudpack/bundler-capabilities": "^0.2.10",
|
|
23
|
+
"@ms-cloudpack/bundler-utilities": "^0.1.25",
|
|
24
|
+
"@ms-cloudpack/common-types": "^0.24.5",
|
|
25
|
+
"@ms-cloudpack/esm-stub-utilities": "^0.14.6",
|
|
26
|
+
"@ms-cloudpack/package-utilities": "^11.3.2",
|
|
27
27
|
"@ms-cloudpack/path-string-parsing": "^1.2.6",
|
|
28
|
-
"@ms-cloudpack/path-utilities": "^3.0.
|
|
28
|
+
"@ms-cloudpack/path-utilities": "^3.0.2",
|
|
29
29
|
"@rollup/plugin-dynamic-import-vars": "^2.0.0",
|
|
30
30
|
"@rollup/plugin-json": "^6.0.0",
|
|
31
31
|
"@rollup/plugin-node-resolve": "^15.0.0",
|