@komaci/esm-generator 244.2.9 → 246.0.1
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/build/__tests__/compile-generated-module-fixtures.spec.js +2 -2
- package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-imports/actual.d.ts +6 -0
- package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-imports/actual.js +16 -0
- package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-nonAnalyzable-imports/actual.d.ts +4 -0
- package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-nonAnalyzable-imports/actual.js +18 -0
- package/build/__tests__/komaci-bundle-module.fixtures.spec.js +2 -2
- package/build/__tests__/komaci-bundle-multiple-templates-module.fixtures.spec.js +2 -2
- package/build/__tests__/komaci-script-module.fixtures.spec.js +2 -2
- package/build/__tests__/komaci-template-module.fixtures.spec.js +2 -2
- package/package.json +4 -4
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const glob_1 =
|
|
8
|
+
const glob_1 = require("glob");
|
|
9
9
|
const sfdc_lwc_compiler_1 = require("@lwc-platform/sfdc-lwc-compiler");
|
|
10
10
|
const compilerConfigs_1 = require("./compilerConfigs");
|
|
11
11
|
const EXPECTED_SRC_FILENAME = 'expected.src';
|
|
12
12
|
describe('fixtures', () => {
|
|
13
|
-
const fixtures = glob_1.
|
|
13
|
+
const fixtures = (0, glob_1.globSync)(path_1.default.resolve(__dirname, '**/expected.src'));
|
|
14
14
|
for (const caseEntry of fixtures) {
|
|
15
15
|
const caseFolder = path_1.default.dirname(caseEntry);
|
|
16
16
|
const caseName = path_1.default.relative(__dirname, caseFolder);
|
package/build/__tests__/fixtures-combined-files/include-salesforce-resourceUrl-imports/actual.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lwc_1 = require("lwc");
|
|
7
|
+
const myResource_1 = __importDefault(require("@salesforce/resourceUrl/myResource"));
|
|
8
|
+
class StaticResourceLWCExample extends lwc_1.LightningElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.spring20Logo = myResource_1.default + '/images/salesforce-spring-2020.jpg';
|
|
12
|
+
this.summer20Logo = myResource_1.default + '/images/salesfoce-summer-2020.jpeg';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = StaticResourceLWCExample;
|
|
16
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lwc_1 = require("lwc");
|
|
7
|
+
const myLib_1 = __importDefault(require("@salesforce/resourceUrl/myLib"));
|
|
8
|
+
const platformResourceLoader_1 = require("lightning/platformResourceLoader");
|
|
9
|
+
class StaticResourceLWCExample extends lwc_1.LightningElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
(0, platformResourceLoader_1.loadScript)(this, `${myLib_1.default}/index.js`).then(() => {
|
|
13
|
+
let result = myLib_1.default.myFunction(3, 3);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.default = StaticResourceLWCExample;
|
|
18
|
+
//# sourceMappingURL=actual.js.map
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const glob_1 =
|
|
7
|
+
const glob_1 = require("glob");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const index_1 = require("../index");
|
|
10
10
|
const FIXTURES_DIR = path_1.default.join(__dirname, 'fixtures-combined-files');
|
|
@@ -38,7 +38,7 @@ function generateModuleSource(komaciHTMLDoc, komaciJSDoc, srcFileMap) {
|
|
|
38
38
|
// eslint-disable-next-line jest/no-disabled-tests
|
|
39
39
|
describe('fixtures', () => {
|
|
40
40
|
// find all folder paths containing a file whose name ends in ".src"
|
|
41
|
-
const fixtures = glob_1.
|
|
41
|
+
const fixtures = (0, glob_1.globSync)(path_1.default.resolve(FIXTURES_DIR, '**/*.json'));
|
|
42
42
|
for (const caseEntry of fixtures) {
|
|
43
43
|
const caseFolder = path_1.default.dirname(caseEntry);
|
|
44
44
|
const caseName = path_1.default.relative(FIXTURES_DIR, caseFolder);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const glob_1 =
|
|
7
|
+
const glob_1 = require("glob");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const index_1 = require("../index");
|
|
10
10
|
const fs_2 = require("fs");
|
|
@@ -16,7 +16,7 @@ const EXPECTED_JS_FILENAME = 'expected.src';
|
|
|
16
16
|
describe('fixtures', () => {
|
|
17
17
|
// find all folder paths containing a directory called component. This gives us the flexability to name the parent directory
|
|
18
18
|
// either lightning for external comps and c for internal comps.
|
|
19
|
-
const fixtures = glob_1.
|
|
19
|
+
const fixtures = (0, glob_1.globSync)(path_1.default.resolve(FIXTURES_DIR, '**/*/component'));
|
|
20
20
|
for (const caseEntry of fixtures) {
|
|
21
21
|
const caseFolder = path_1.default.dirname(caseEntry);
|
|
22
22
|
const relativePath = path_1.default.relative(FIXTURES_DIR, caseFolder);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const glob_1 =
|
|
7
|
+
const glob_1 = require("glob");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const index_1 = require("../index");
|
|
10
10
|
const FIXTURES_DIR = path_1.default.join(__dirname, 'fixtures-script-files');
|
|
@@ -32,7 +32,7 @@ function generateModuleSource(komaciDoc, actualSrc) {
|
|
|
32
32
|
}
|
|
33
33
|
// eslint-disable-next-line jest/no-disabled-tests
|
|
34
34
|
describe('fixtures', () => {
|
|
35
|
-
const fixtures = glob_1.
|
|
35
|
+
const fixtures = (0, glob_1.globSync)(path_1.default.resolve(FIXTURES_DIR, '**/*.json'));
|
|
36
36
|
for (const caseEntry of fixtures) {
|
|
37
37
|
const caseFolder = path_1.default.dirname(caseEntry);
|
|
38
38
|
const caseName = path_1.default.relative(FIXTURES_DIR, caseFolder);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
const glob_1 =
|
|
7
|
+
const glob_1 = require("glob");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const index_1 = require("../index");
|
|
10
10
|
const FIXTURES_DIR = path_1.default.join(__dirname, 'fixtures-template-files');
|
|
@@ -24,7 +24,7 @@ function generateModuleSource(komaciDoc) {
|
|
|
24
24
|
}
|
|
25
25
|
// eslint-disable-next-line jest/no-disabled-tests
|
|
26
26
|
describe('template only fixtures', () => {
|
|
27
|
-
const fixtures = glob_1.
|
|
27
|
+
const fixtures = (0, glob_1.globSync)(path_1.default.resolve(FIXTURES_DIR, '**/*.json'));
|
|
28
28
|
for (const caseEntry of fixtures) {
|
|
29
29
|
const caseFolder = path_1.default.dirname(caseEntry);
|
|
30
30
|
const caseName = path_1.default.relative(FIXTURES_DIR, caseFolder);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/esm-generator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "246.0.1",
|
|
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": "
|
|
33
|
-
"@komaci/static-analyzer": "
|
|
32
|
+
"@komaci/common-shared": "246.0.1",
|
|
33
|
+
"@komaci/static-analyzer": "246.0.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@komaci/types": "
|
|
36
|
+
"@komaci/types": "246.0.1",
|
|
37
37
|
"@lwc-platform/sfdc-lwc-compiler": "244.17.2-2.40.0",
|
|
38
38
|
"@lwc/metadata": "2.40.0-0"
|
|
39
39
|
}
|