@ms-cloudpack/bundler 0.3.3 → 0.3.6

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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,88 @@
2
2
  "name": "@ms-cloudpack/bundler",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 16 Aug 2022 08:11:49 GMT",
5
+ "date": "Fri, 26 Aug 2022 08:12:03 GMT",
6
+ "tag": "@ms-cloudpack/bundler_v0.3.6",
7
+ "version": "0.3.6",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@ms-cloudpack/bundler",
13
+ "comment": "Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.7",
14
+ "commit": "82e993fc365499d51ac44286401ffbcaee5d892e"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@ms-cloudpack/bundler",
19
+ "comment": "Bump @ms-cloudpack/bundler-plugin-ori to v0.3.8",
20
+ "commit": "82e993fc365499d51ac44286401ffbcaee5d892e"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ms-cloudpack/bundler",
25
+ "comment": "Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.6",
26
+ "commit": "82e993fc365499d51ac44286401ffbcaee5d892e"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Wed, 24 Aug 2022 08:14:41 GMT",
33
+ "tag": "@ms-cloudpack/bundler_v0.3.5",
34
+ "version": "0.3.5",
35
+ "comments": {
36
+ "patch": [
37
+ {
38
+ "author": "dzearing@microsoft.com",
39
+ "package": "@ms-cloudpack/bundler",
40
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25",
41
+ "comment": "Entries we send to the bundler are filtered based on supported types. For now, this expectation is defined in `getBundlerOptions`, but really this should be proprietary to the bundler itself."
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@ms-cloudpack/bundler",
46
+ "comment": "Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.6",
47
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@ms-cloudpack/bundler",
52
+ "comment": "Bump @ms-cloudpack/bundler-plugin-ori to v0.3.7",
53
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
54
+ },
55
+ {
56
+ "author": "beachball",
57
+ "package": "@ms-cloudpack/bundler",
58
+ "comment": "Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.5",
59
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@ms-cloudpack/bundler",
64
+ "comment": "Bump @ms-cloudpack/package-utilities to v0.8.0",
65
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
66
+ }
67
+ ]
68
+ }
69
+ },
70
+ {
71
+ "date": "Tue, 23 Aug 2022 08:12:04 GMT",
72
+ "tag": "@ms-cloudpack/bundler_v0.3.4",
73
+ "version": "0.3.4",
74
+ "comments": {
75
+ "patch": [
76
+ {
77
+ "author": "beachball",
78
+ "package": "@ms-cloudpack/bundler",
79
+ "comment": "Bump @ms-cloudpack/bundler-plugin-ori to v0.3.6",
80
+ "commit": "e326723b6525cae8afc729bbd3c8c61aef7c1545"
81
+ }
82
+ ]
83
+ }
84
+ },
85
+ {
86
+ "date": "Tue, 16 Aug 2022 08:12:03 GMT",
6
87
  "tag": "@ms-cloudpack/bundler_v0.3.3",
7
88
  "version": "0.3.3",
8
89
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,42 @@
1
1
  # Change Log - @ms-cloudpack/bundler
2
2
 
3
- This log was last generated on Tue, 16 Aug 2022 08:11:49 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 26 Aug 2022 08:12:03 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.3.6
8
+
9
+ Fri, 26 Aug 2022 08:12:03 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.7
14
+ - Bump @ms-cloudpack/bundler-plugin-ori to v0.3.8
15
+ - Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.6
16
+
17
+ ## 0.3.5
18
+
19
+ Wed, 24 Aug 2022 08:14:41 GMT
20
+
21
+ ### Patches
22
+
23
+ - Entries we send to the bundler are filtered based on supported types. For now, this expectation is defined in `getBundlerOptions`, but really this should be proprietary to the bundler itself. (dzearing@microsoft.com)
24
+ - Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.6
25
+ - Bump @ms-cloudpack/bundler-plugin-ori to v0.3.7
26
+ - Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.5
27
+ - Bump @ms-cloudpack/package-utilities to v0.8.0
28
+
29
+ ## 0.3.4
30
+
31
+ Tue, 23 Aug 2022 08:12:04 GMT
32
+
33
+ ### Patches
34
+
35
+ - Bump @ms-cloudpack/bundler-plugin-ori to v0.3.6
36
+
7
37
  ## 0.3.3
8
38
 
9
- Tue, 16 Aug 2022 08:11:49 GMT
39
+ Tue, 16 Aug 2022 08:12:03 GMT
10
40
 
11
41
  ### Patches
12
42
 
@@ -1,12 +1,38 @@
1
1
  import { resolvePackageEntries, getPackageDefinition } from '@ms-cloudpack/package-utilities';
2
+ import path from 'path';
3
+ const resourceExtensions = [
4
+ '.bmp',
5
+ '.gif',
6
+ '.jpeg',
7
+ '.jpg',
8
+ '.mp3',
9
+ '.mp4',
10
+ '.otf',
11
+ '.png',
12
+ '.svg',
13
+ '.ttf',
14
+ '.webp',
15
+ '.woff',
16
+ '.woff2',
17
+ ];
18
+ const sourceExtensions = ['.mts', '.cts', '.mjs', '.cjs', '.js', '.tsx', '.ts'];
19
+ const textExtensions = ['.htm', '.html', '.txt'];
20
+ const supportedExtensions = [...resourceExtensions, ...sourceExtensions, ...textExtensions];
21
+ function isBundleableEntry(fileName) {
22
+ return supportedExtensions.indexOf(path.extname(fileName).toLowerCase()) >= 0;
23
+ }
2
24
  export async function getBundlerOptions(options) {
3
25
  const packageDefinition = await getPackageDefinition(options.packagePath);
4
26
  if (!packageDefinition) {
5
27
  throw new Error(`Package definition (package.json) missing at "${options.packagePath}"`);
6
28
  }
29
+ const entries = (await resolvePackageEntries(packageDefinition)).filter((entry) => isBundleableEntry(entry));
30
+ if (Object.keys(entries).length === 0) {
31
+ throw new Error(`Package definition at "${options.packagePath}/package.json" missing entries.`);
32
+ }
7
33
  return {
8
34
  ...options,
9
- entries: await resolvePackageEntries(packageDefinition),
35
+ entries,
10
36
  };
11
37
  }
12
38
  //# sourceMappingURL=getBundlerOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBundlerOptions.js","sourceRoot":"","sources":["../src/getBundlerOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE9F,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAA6B;IACnE,MAAM,iBAAiB,GAAG,MAAM,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1E,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,iDAAiD,OAAO,CAAC,WAAW,GAAG,CAAC,CAAC;KAC1F;IAED,OAAO;QACL,GAAG,OAAO;QACV,OAAO,EAAE,MAAM,qBAAqB,CAAC,iBAAiB,CAAC;KACxD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"getBundlerOptions.js","sourceRoot":"","sources":["../src/getBundlerOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,kBAAkB,GAAG;IACzB,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,M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29.2"
8
+ "packageVersion": "7.29.5"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/bundler",
3
- "version": "0.3.3",
3
+ "version": "0.3.6",
4
4
  "description": "An abstraction to bundle source code.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,10 +13,10 @@
13
13
  }
14
14
  },
15
15
  "dependencies": {
16
- "@ms-cloudpack/bundler-plugin-esbuild": "^0.2.5",
17
- "@ms-cloudpack/bundler-plugin-ori": "^0.3.5",
18
- "@ms-cloudpack/bundler-plugin-rollup": "^0.1.4",
19
- "@ms-cloudpack/package-utilities": "^0.7.0"
16
+ "@ms-cloudpack/bundler-plugin-esbuild": "^0.2.7",
17
+ "@ms-cloudpack/bundler-plugin-ori": "^0.3.8",
18
+ "@ms-cloudpack/bundler-plugin-rollup": "^0.1.6",
19
+ "@ms-cloudpack/package-utilities": "^0.8.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@ms-cloudpack/scripts": "*",