@ms-cloudpack/bundler 0.3.2 → 0.3.5

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,94 @@
2
2
  "name": "@ms-cloudpack/bundler",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 13 Aug 2022 08:13:57 GMT",
5
+ "date": "Wed, 24 Aug 2022 08:14:22 GMT",
6
+ "tag": "@ms-cloudpack/bundler_v0.3.5",
7
+ "version": "0.3.5",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "dzearing@microsoft.com",
12
+ "package": "@ms-cloudpack/bundler",
13
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25",
14
+ "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."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@ms-cloudpack/bundler",
19
+ "comment": "Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.6",
20
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ms-cloudpack/bundler",
25
+ "comment": "Bump @ms-cloudpack/bundler-plugin-ori to v0.3.7",
26
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@ms-cloudpack/bundler",
31
+ "comment": "Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.5",
32
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@ms-cloudpack/bundler",
37
+ "comment": "Bump @ms-cloudpack/package-utilities to v0.8.0",
38
+ "commit": "3ba31149f7ca723c11f75bca3cc036e93887cd25"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Tue, 23 Aug 2022 08:12:04 GMT",
45
+ "tag": "@ms-cloudpack/bundler_v0.3.4",
46
+ "version": "0.3.4",
47
+ "comments": {
48
+ "patch": [
49
+ {
50
+ "author": "beachball",
51
+ "package": "@ms-cloudpack/bundler",
52
+ "comment": "Bump @ms-cloudpack/bundler-plugin-ori to v0.3.6",
53
+ "commit": "e326723b6525cae8afc729bbd3c8c61aef7c1545"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "date": "Tue, 16 Aug 2022 08:12:03 GMT",
60
+ "tag": "@ms-cloudpack/bundler_v0.3.3",
61
+ "version": "0.3.3",
62
+ "comments": {
63
+ "patch": [
64
+ {
65
+ "author": "beachball",
66
+ "package": "@ms-cloudpack/bundler",
67
+ "comment": "Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.5",
68
+ "commit": "d3199fbaf45c136cafa240c075566fa468689bce"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@ms-cloudpack/bundler",
73
+ "comment": "Bump @ms-cloudpack/bundler-plugin-ori to v0.3.5",
74
+ "commit": "d3199fbaf45c136cafa240c075566fa468689bce"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@ms-cloudpack/bundler",
79
+ "comment": "Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.4",
80
+ "commit": "d3199fbaf45c136cafa240c075566fa468689bce"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@ms-cloudpack/bundler",
85
+ "comment": "Bump @ms-cloudpack/package-utilities to v0.7.0",
86
+ "commit": "d3199fbaf45c136cafa240c075566fa468689bce"
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ "date": "Sat, 13 Aug 2022 08:14:13 GMT",
6
93
  "tag": "@ms-cloudpack/bundler_v0.3.2",
7
94
  "version": "0.3.2",
8
95
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,43 @@
1
1
  # Change Log - @ms-cloudpack/bundler
2
2
 
3
- This log was last generated on Sat, 13 Aug 2022 08:13:57 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 24 Aug 2022 08:14:22 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.3.5
8
+
9
+ Wed, 24 Aug 2022 08:14:22 GMT
10
+
11
+ ### Patches
12
+
13
+ - 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)
14
+ - Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.6
15
+ - Bump @ms-cloudpack/bundler-plugin-ori to v0.3.7
16
+ - Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.5
17
+ - Bump @ms-cloudpack/package-utilities to v0.8.0
18
+
19
+ ## 0.3.4
20
+
21
+ Tue, 23 Aug 2022 08:12:04 GMT
22
+
23
+ ### Patches
24
+
25
+ - Bump @ms-cloudpack/bundler-plugin-ori to v0.3.6
26
+
27
+ ## 0.3.3
28
+
29
+ Tue, 16 Aug 2022 08:12:03 GMT
30
+
31
+ ### Patches
32
+
33
+ - Bump @ms-cloudpack/bundler-plugin-esbuild to v0.2.5
34
+ - Bump @ms-cloudpack/bundler-plugin-ori to v0.3.5
35
+ - Bump @ms-cloudpack/bundler-plugin-rollup to v0.1.4
36
+ - Bump @ms-cloudpack/package-utilities to v0.7.0
37
+
7
38
  ## 0.3.2
8
39
 
9
- Sat, 13 Aug 2022 08:13:57 GMT
40
+ Sat, 13 Aug 2022 08:14:13 GMT
10
41
 
11
42
  ### Patches
12
43
 
@@ -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,MA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AiC,CAAC,CAAC;KACjG;IAED,OAAO;QACL,GAAG,OAAO;QACV,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.29.0"
8
+ "packageVersion": "7.29.3"
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.2",
3
+ "version": "0.3.5",
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.4",
17
- "@ms-cloudpack/bundler-plugin-ori": "^0.3.4",
18
- "@ms-cloudpack/bundler-plugin-rollup": "^0.1.3",
19
- "@ms-cloudpack/package-utilities": "^0.6.1"
16
+ "@ms-cloudpack/bundler-plugin-esbuild": "^0.2.6",
17
+ "@ms-cloudpack/bundler-plugin-ori": "^0.3.7",
18
+ "@ms-cloudpack/bundler-plugin-rollup": "^0.1.5",
19
+ "@ms-cloudpack/package-utilities": "^0.8.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@ms-cloudpack/scripts": "*",