@komaci/esm-generator 244.2.1 → 244.2.3

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 @@ const fs_1 = __importDefault(require("fs"));
7
7
  const path_1 = __importDefault(require("path"));
8
8
  const glob_1 = __importDefault(require("glob"));
9
9
  const sfdc_lwc_compiler_1 = require("@lwc-platform/sfdc-lwc-compiler");
10
+ const compilerConfigs_1 = require("./compilerConfigs");
10
11
  const EXPECTED_SRC_FILENAME = 'expected.src';
11
12
  describe('fixtures', () => {
12
13
  const fixtures = glob_1.default.sync(path_1.default.resolve(__dirname, '**/expected.src'));
@@ -24,6 +25,7 @@ describe('fixtures', () => {
24
25
  const fileStr = readFixtureFile(EXPECTED_SRC_FILENAME);
25
26
  expect(fileStr).not.toBeNull();
26
27
  const files = { 'test.js': fileStr !== null ? fileStr : '' };
28
+ // Note: lockerConfig and compat outputConfig flags are mutually exclusive.
27
29
  const result = await (0, sfdc_lwc_compiler_1.compile)({
28
30
  bundle: {
29
31
  name: 'test',
@@ -36,8 +38,10 @@ describe('fixtures', () => {
36
38
  },
37
39
  },
38
40
  },
41
+ compilerConfigs: compilerConfigs_1.compilerConfigs,
39
42
  });
40
43
  expect(result.success).toBe(true);
44
+ expect(result.results).toHaveLength(compilerConfigs_1.compilerConfigs.length);
41
45
  });
42
46
  }
43
47
  });
@@ -0,0 +1,36 @@
1
+ export declare const compilerConfigs: ({
2
+ outputConfig: {
3
+ compat: boolean;
4
+ minify: boolean;
5
+ sourcemap: boolean;
6
+ env: {
7
+ NODE_ENV: string;
8
+ };
9
+ lockerConfig?: undefined;
10
+ };
11
+ } | {
12
+ outputConfig: {
13
+ minify: boolean;
14
+ sourcemap: boolean;
15
+ env: {
16
+ NODE_ENV: string;
17
+ };
18
+ lockerConfig: {
19
+ sourcemap: boolean;
20
+ };
21
+ compat?: undefined;
22
+ };
23
+ } | {
24
+ outputConfig: {
25
+ minify: boolean;
26
+ sourcemap: boolean;
27
+ env: {
28
+ NODE_ENV: string;
29
+ };
30
+ lockerConfig: {
31
+ sourcemap: string;
32
+ };
33
+ compat?: undefined;
34
+ };
35
+ })[];
36
+ //# sourceMappingURL=compilerConfigs.d.ts.map
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compilerConfigs = void 0;
4
+ exports.compilerConfigs = [
5
+ {
6
+ outputConfig: {
7
+ compat: true,
8
+ minify: true,
9
+ sourcemap: true,
10
+ env: {
11
+ NODE_ENV: 'production',
12
+ },
13
+ },
14
+ },
15
+ {
16
+ outputConfig: {
17
+ compat: true,
18
+ minify: true,
19
+ sourcemap: true,
20
+ env: {
21
+ NODE_ENV: 'development',
22
+ },
23
+ },
24
+ },
25
+ {
26
+ outputConfig: {
27
+ compat: false,
28
+ minify: true,
29
+ sourcemap: true,
30
+ env: {
31
+ NODE_ENV: 'production',
32
+ },
33
+ },
34
+ },
35
+ {
36
+ outputConfig: {
37
+ compat: false,
38
+ minify: true,
39
+ sourcemap: true,
40
+ env: {
41
+ NODE_ENV: 'development',
42
+ },
43
+ },
44
+ },
45
+ {
46
+ outputConfig: {
47
+ compat: true,
48
+ minify: false,
49
+ sourcemap: true,
50
+ env: {
51
+ NODE_ENV: 'production',
52
+ },
53
+ },
54
+ },
55
+ {
56
+ outputConfig: {
57
+ compat: true,
58
+ minify: false,
59
+ sourcemap: true,
60
+ env: {
61
+ NODE_ENV: 'development',
62
+ },
63
+ },
64
+ },
65
+ {
66
+ outputConfig: {
67
+ compat: true,
68
+ minify: true,
69
+ sourcemap: false,
70
+ env: {
71
+ NODE_ENV: 'production',
72
+ },
73
+ },
74
+ },
75
+ {
76
+ outputConfig: {
77
+ compat: true,
78
+ minify: true,
79
+ sourcemap: false,
80
+ env: {
81
+ NODE_ENV: 'development',
82
+ },
83
+ },
84
+ },
85
+ {
86
+ outputConfig: {
87
+ minify: true,
88
+ sourcemap: true,
89
+ env: {
90
+ NODE_ENV: 'production',
91
+ },
92
+ lockerConfig: { sourcemap: true },
93
+ },
94
+ },
95
+ {
96
+ outputConfig: {
97
+ minify: true,
98
+ sourcemap: true,
99
+ env: {
100
+ NODE_ENV: 'development',
101
+ },
102
+ lockerConfig: { sourcemap: true },
103
+ },
104
+ },
105
+ {
106
+ outputConfig: {
107
+ minify: true,
108
+ sourcemap: true,
109
+ env: {
110
+ NODE_ENV: 'production',
111
+ },
112
+ lockerConfig: { sourcemap: 'hidden' },
113
+ },
114
+ },
115
+ {
116
+ outputConfig: {
117
+ minify: true,
118
+ sourcemap: true,
119
+ env: {
120
+ NODE_ENV: 'development',
121
+ },
122
+ lockerConfig: { sourcemap: 'hidden' },
123
+ },
124
+ },
125
+ ];
126
+ //# sourceMappingURL=compilerConfigs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@komaci/esm-generator",
3
- "version": "244.2.1",
3
+ "version": "244.2.3",
4
4
  "description": "Komaci generator for ADG ES modules",
5
5
  "homepage": "https://komaci.dev/",
6
6
  "repository": {
@@ -29,11 +29,11 @@
29
29
  "@babel/core": "^7.9.0",
30
30
  "@babel/generator": "^7.9.0",
31
31
  "@babel/types": "^7.9.0",
32
- "@komaci/common-shared": "244.2.1",
33
- "@komaci/static-analyzer": "244.2.1"
32
+ "@komaci/common-shared": "244.2.3",
33
+ "@komaci/static-analyzer": "244.2.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@komaci/types": "244.2.1",
36
+ "@komaci/types": "244.2.3",
37
37
  "@lwc-platform/sfdc-lwc-compiler": "242.15.1-2.28.0",
38
38
  "@lwc/metadata": "^2.28.0-0"
39
39
  }