@ms-cloudpack/bundler
Advanced tools
Comparing version 0.0.7 to 0.1.0
@@ -5,3 +5,30 @@ { | ||
{ | ||
"date": "Thu, 19 May 2022 21:03:49 GMT", | ||
"date": "Fri, 20 May 2022 04:25:53 GMT", | ||
"tag": "@ms-cloudpack/bundler_v0.1.0", | ||
"version": "0.1.0", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "dzearing@microsoft.com", | ||
"package": "@ms-cloudpack/bundler", | ||
"commit": "b39bb143fc53e622c39f9e9fd349f71c9ebadd77", | ||
"comment": "Updating to conform to latest typings." | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@ms-cloudpack/bundler", | ||
"comment": "Bump @ms-cloudpack/bundler-plugin-esbuild to v0.1.0", | ||
"commit": "b39bb143fc53e622c39f9e9fd349f71c9ebadd77" | ||
}, | ||
{ | ||
"author": "beachball", | ||
"package": "@ms-cloudpack/bundler", | ||
"comment": "Bump @ms-cloudpack/package-utilities to v0.2.0", | ||
"commit": "b39bb143fc53e622c39f9e9fd349f71c9ebadd77" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 19 May 2022 21:04:02 GMT", | ||
"tag": "@ms-cloudpack/bundler_v0.0.7", | ||
@@ -15,3 +42,3 @@ "version": "0.0.7", | ||
"comment": "Bump @ms-cloudpack/bundler-plugin-esbuild to v0.0.7", | ||
"commit": "d701b1fd3997bfb2f2c67f06a94bd79fadbcac6d" | ||
"commit": "9bd9230fc985c94b2ad7d32a1abadada2fa75852" | ||
}, | ||
@@ -22,3 +49,3 @@ { | ||
"comment": "Bump @ms-cloudpack/package-utilities to v0.1.7", | ||
"commit": "d701b1fd3997bfb2f2c67f06a94bd79fadbcac6d" | ||
"commit": "9bd9230fc985c94b2ad7d32a1abadada2fa75852" | ||
} | ||
@@ -25,0 +52,0 @@ ] |
# Change Log - @ms-cloudpack/bundler | ||
This log was last generated on Thu, 19 May 2022 21:03:49 GMT and should not be manually modified. | ||
This log was last generated on Fri, 20 May 2022 04:25:53 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 0.1.0 | ||
Fri, 20 May 2022 04:25:53 GMT | ||
### Minor changes | ||
- Updating to conform to latest typings. (dzearing@microsoft.com) | ||
- Bump @ms-cloudpack/bundler-plugin-esbuild to v0.1.0 | ||
- Bump @ms-cloudpack/package-utilities to v0.2.0 | ||
## 0.0.7 | ||
Thu, 19 May 2022 21:03:49 GMT | ||
Thu, 19 May 2022 21:04:02 GMT | ||
@@ -11,0 +21,0 @@ ### Patches |
export const rollup = { | ||
name: 'rollup', | ||
bundle: async function bundle(options) { | ||
const result = { | ||
options, | ||
}; | ||
const result = {}; | ||
return result; | ||
@@ -8,0 +6,0 @@ }, |
export const webpack = { | ||
name: 'webpack', | ||
bundle: async function bundle(options) { | ||
const result = { | ||
options, | ||
}; | ||
const result = {}; | ||
return result; | ||
@@ -8,0 +6,0 @@ }, |
import type { Bundler } from '@ms-cloudpack/bundler-types'; | ||
export declare const allBundlers: Record<string, Bundler>; | ||
export declare const allBundlers: Record<string, () => Promise<Bundler>>; |
@@ -1,9 +0,7 @@ | ||
import { esbuild } from '@ms-cloudpack/bundler-plugin-esbuild'; | ||
import { rollup } from './abstractions/rollup.js'; | ||
import { webpack } from './abstractions/webpack.js'; | ||
export const allBundlers = { | ||
esbuild, | ||
rollup, | ||
webpack, | ||
esbuild: async () => (await import('@ms-cloudpack/bundler-plugin-esbuild')).esbuild, | ||
rollup: async () => (await import('./abstractions/rollup.js')).rollup, | ||
webpack: async () => (await import('./abstractions/webpack.js')).webpack, | ||
ori: async () => (await import('@ms-cloudpack/bundler-plugin-ori')).oriBuild, | ||
}; | ||
//# sourceMappingURL=allBundlers.js.map |
@@ -17,4 +17,15 @@ import { chooseBundler } from './chooseBundler.js'; | ||
const bundler = await chooseBundler(bundlerOptions); | ||
return await bundler.bundle(bundlerOptions); | ||
try { | ||
return await bundler.bundle(bundlerOptions); | ||
} | ||
catch (e) { | ||
return { | ||
errors: [ | ||
{ | ||
text: `An unexpected exception occurred: ${e}`, | ||
}, | ||
], | ||
}; | ||
} | ||
} | ||
//# sourceMappingURL=bundlePackage.js.map |
@@ -6,15 +6,15 @@ import path from 'path'; | ||
const { bundlerType, packagePath, entries, outputType } = options; | ||
const { webpack, rollup, esbuild } = allBundlers; | ||
const { webpack, rollup, ori } = allBundlers; | ||
if (!bundlerType || bundlerType === 'auto') { | ||
if (outputType === 'app') { | ||
return webpack; | ||
return await webpack(); | ||
} | ||
const moduleType = await detectModuleType(path.resolve(packagePath, entries[0])); | ||
if (moduleType === 'cjs') { | ||
return rollup; | ||
return await rollup(); | ||
} | ||
return esbuild; | ||
return await ori(); | ||
} | ||
return allBundlers[bundlerType]; | ||
return await allBundlers[bundlerType](); | ||
} | ||
//# sourceMappingURL=chooseBundler.js.map |
{ | ||
"name": "@ms-cloudpack/bundler", | ||
"version": "0.0.7", | ||
"version": "0.1.0", | ||
"description": "An abstraction to bundle source code.", | ||
@@ -16,4 +16,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@ms-cloudpack/bundler-plugin-esbuild": "^0.0.7", | ||
"@ms-cloudpack/package-utilities": "^0.1.7" | ||
"@ms-cloudpack/bundler-plugin-esbuild": "^0.1.0", | ||
"@ms-cloudpack/package-utilities": "^0.2.0" | ||
}, | ||
@@ -20,0 +20,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19799
296
31
+ Added@ms-cloudpack/bundler-plugin-esbuild@0.1.7(transitive)
+ Added@ms-cloudpack/esbuild-utilities@0.0.3(transitive)
+ Added@ms-cloudpack/package-overrides@0.0.2(transitive)
+ Added@ms-cloudpack/package-utilities@0.2.00.5.1(transitive)
+ Added@ms-cloudpack/path-utilities@0.2.00.3.2(transitive)
+ Addedmerge@2.1.1(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedtype-fest@2.19.0(transitive)
- Removed@ms-cloudpack/bundler-plugin-esbuild@0.0.7(transitive)
- Removed@ms-cloudpack/package-utilities@0.1.7(transitive)
- Removed@ms-cloudpack/path-utilities@0.1.0(transitive)