@loopback/example-webpack 0.5.1 → 0.7.0
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.md +48 -0
- package/dist/__tests__/integration/bundle-node.integration.js +4 -4
- package/dist/__tests__/integration/bundle-node.integration.js.map +1 -1
- package/dist/__tests__/integration/bundle-web.integration.js +11 -11
- package/dist/__tests__/integration/bundle-web.integration.js.map +1 -1
- package/dist/__tests__/integration/dependency-injection.integration.js +2 -2
- package/dist/__tests__/integration/dependency-injection.integration.js.map +1 -1
- package/dist/__tests__/integration/test-helper.js +3 -3
- package/dist/__tests__/integration/test-helper.js.map +1 -1
- package/dist/bundle-node.js +1 -1
- package/dist/bundle-web.js +1 -1
- package/dist/dependency-injection.js +14 -14
- package/dist/dependency-injection.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/__tests__/integration/bundle-node.integration.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.7.0](https://github.com/loopbackio/loopback-next/compare/@loopback/example-webpack@0.6.1...@loopback/example-webpack@0.7.0) (2022-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* update @types/node to v12 ([65a09a4](https://github.com/loopbackio/loopback-next/commit/65a09a406e4865f774f97b58af9e616733b8b255))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.6.1](https://github.com/loopbackio/loopback-next/compare/@loopback/example-webpack@0.6.0...@loopback/example-webpack@0.6.1) (2022-01-11)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @loopback/example-webpack
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [0.6.0](https://github.com/loopbackio/loopback-next/compare/@loopback/example-webpack@0.5.2...@loopback/example-webpack@0.6.0) (2021-11-18)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* drop support for Node.js v10 ([9bcbbb3](https://github.com/loopbackio/loopback-next/commit/9bcbbb358ec3eabc3033d4e7e1c22b524a7069b3))
|
|
31
|
+
* support Node.js v17 ([8d86c03](https://github.com/loopbackio/loopback-next/commit/8d86c03cb7047e2b1f18d05870628ef5783e71b2))
|
|
32
|
+
* upgrade to TypeScript 4.5.2 ([72ece91](https://github.com/loopbackio/loopback-next/commit/72ece91289ecfdfd8747bb9888ad75db73e8ff4b))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### BREAKING CHANGES
|
|
36
|
+
|
|
37
|
+
* drop support for Node.js v10
|
|
38
|
+
|
|
39
|
+
Co-authored-by: Francisco Buceta <frbuceta@gmail.com>
|
|
40
|
+
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [0.5.2](https://github.com/loopbackio/loopback-next/compare/@loopback/example-webpack@0.5.1...@loopback/example-webpack@0.5.2) (2021-10-18)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @loopback/example-webpack
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
6
54
|
## [0.5.1](https://github.com/loopbackio/loopback-next/compare/@loopback/example-webpack@0.5.0...@loopback/example-webpack@0.5.1) (2021-09-16)
|
|
7
55
|
|
|
8
56
|
|
|
@@ -11,17 +11,17 @@ describe('bundle-node.js', () => {
|
|
|
11
11
|
let bundle;
|
|
12
12
|
before('generate bundle-node.js', async function () {
|
|
13
13
|
// It may take some time to generate the bundle using webpack
|
|
14
|
-
this.timeout(
|
|
15
|
-
await test_helper_1.generateBundle('node');
|
|
14
|
+
this.timeout(50000);
|
|
15
|
+
await (0, test_helper_1.generateBundle)('node');
|
|
16
16
|
bundle = require('../../bundle-node');
|
|
17
17
|
});
|
|
18
18
|
it('invokes main function', async () => {
|
|
19
19
|
const greetings = await bundle.main();
|
|
20
|
-
test_helper_1.assertGreetings(greetings);
|
|
20
|
+
(0, test_helper_1.assertGreetings)(greetings);
|
|
21
21
|
});
|
|
22
22
|
it('has access to Context', async () => {
|
|
23
23
|
const ctx = new bundle.Context('my-ctx');
|
|
24
|
-
testlab_1.expect(ctx.name).to.eql('my-ctx');
|
|
24
|
+
(0, testlab_1.expect)(ctx.name).to.eql('my-ctx');
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=bundle-node.integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-node.integration.js","sourceRoot":"","sources":["../../../src/__tests__/integration/bundle-node.integration.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;AAEhE,+CAAyC;AACzC,+CAA8D;AAE9D,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,8DAA8D;IAC9D,IAAI,MAAW,CAAC;IAEhB,MAAM,CAAC,yBAAyB,EAAE,KAAK;QACrC,6DAA6D;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,4BAAc,
|
|
1
|
+
{"version":3,"file":"bundle-node.integration.js","sourceRoot":"","sources":["../../../src/__tests__/integration/bundle-node.integration.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;AAEhE,+CAAyC;AACzC,+CAA8D;AAE9D,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,8DAA8D;IAC9D,IAAI,MAAW,CAAC;IAEhB,MAAM,CAAC,yBAAyB,EAAE,KAAK;QACrC,6DAA6D;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,IAAA,4BAAc,EAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,SAAS,GAAa,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAChD,IAAA,6BAAe,EAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAA,gBAAM,EAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
8
|
const testlab_1 = require("@loopback/testlab");
|
|
9
|
-
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
10
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
-
const puppeteer_1 = tslib_1.__importDefault(require("puppeteer"));
|
|
12
|
-
const url_1 = tslib_1.__importDefault(require("url"));
|
|
9
|
+
const fs_1 = (0, tslib_1.__importDefault)(require("fs"));
|
|
10
|
+
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
11
|
+
const puppeteer_1 = (0, tslib_1.__importDefault)(require("puppeteer"));
|
|
12
|
+
const url_1 = (0, tslib_1.__importDefault)(require("url"));
|
|
13
13
|
const test_helper_1 = require("./test-helper");
|
|
14
14
|
//
|
|
15
15
|
/*
|
|
@@ -22,13 +22,13 @@ const test_helper_1 = require("./test-helper");
|
|
|
22
22
|
*
|
|
23
23
|
* See https://github.com/assaf/zombie/issues/915
|
|
24
24
|
*/
|
|
25
|
-
testlab_1.skipIf(process.platform === 'win32', // Skip on Windows
|
|
25
|
+
(0, testlab_1.skipIf)(process.platform === 'win32', // Skip on Windows
|
|
26
26
|
describe, 'bundle-web.js', () => {
|
|
27
27
|
before('generate bundle-web.js', async function () {
|
|
28
28
|
// It may take some time to generate the bundle using webpack
|
|
29
29
|
this.timeout(30000);
|
|
30
|
-
await test_helper_1.generateBundle('web');
|
|
31
|
-
testlab_1.expect(fs_1.default.existsSync(path_1.default.join(__dirname, '../../bundle-web.js'))).to.be.true();
|
|
30
|
+
await (0, test_helper_1.generateBundle)('web');
|
|
31
|
+
(0, testlab_1.expect)(fs_1.default.existsSync(path_1.default.join(__dirname, '../../bundle-web.js'))).to.be.true();
|
|
32
32
|
});
|
|
33
33
|
let browser;
|
|
34
34
|
let html;
|
|
@@ -50,10 +50,10 @@ describe, 'bundle-web.js', () => {
|
|
|
50
50
|
it('should see the page with greetings', () => {
|
|
51
51
|
let body = html;
|
|
52
52
|
body = body.replace(/\[[^\[\]]+\] /g, '');
|
|
53
|
-
testlab_1.expect(body).to.match(/<li>\(en\) Hello, Jane!<\/li>/);
|
|
54
|
-
testlab_1.expect(body).to.match(/<li>Hello, John!<\/li>/);
|
|
55
|
-
testlab_1.expect(body).to.match(/<li>\(zh\) 你好,John!<\/li>/);
|
|
56
|
-
testlab_1.expect(body).to.match(/<li>\(en\) Hello, Jane!<\/li>/);
|
|
53
|
+
(0, testlab_1.expect)(body).to.match(/<li>\(en\) Hello, Jane!<\/li>/);
|
|
54
|
+
(0, testlab_1.expect)(body).to.match(/<li>Hello, John!<\/li>/);
|
|
55
|
+
(0, testlab_1.expect)(body).to.match(/<li>\(zh\) 你好,John!<\/li>/);
|
|
56
|
+
(0, testlab_1.expect)(body).to.match(/<li>\(en\) Hello, Jane!<\/li>/);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
//# sourceMappingURL=bundle-web.integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-web.integration.js","sourceRoot":"","sources":["../../../src/__tests__/integration/bundle-web.integration.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,+CAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"bundle-web.integration.js","sourceRoot":"","sources":["../../../src/__tests__/integration/bundle-web.integration.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;;AAEhE,+CAAiD;AACjD,yDAAoB;AAEpB,6DAAwB;AACxB,uEAA6C;AAC7C,2DAAsB;AACtB,+CAA6C;AAE7C,EAAE;AACF;;;;;;;;;GASG;AACH,IAAA,gBAAM,EACJ,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,kBAAkB;AAChD,QAAQ,EACR,eAAe,EACf,GAAG,EAAE;IACH,MAAM,CAAC,wBAAwB,EAAE,KAAK;QACpC,6DAA6D;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,IAAA,4BAAc,EAAC,KAAK,CAAC,CAAC;QAC5B,IAAA,gBAAM,EACJ,YAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC,CAC3D,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,IAAI,OAAgB,CAAC;IACrB,IAAI,IAAY,CAAC;IACjB,MAAM,CAAC,KAAK;QACV,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,OAAO,GAAG,MAAM,mBAAS,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QACrC,MAAM,IAAI,CAAC,IAAI,CACb,aAAG;aACA,aAAa,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;aAC1D,QAAQ,EAAE,EACb,EAAC,SAAS,EAAE,cAAc,EAAC,CAC5B,CAAC;QACF,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B;;;;UAIE;QAEF,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACvD,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChD,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACnD,IAAA,gBAAM,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
|
|
@@ -8,9 +8,9 @@ const __1 = require("../..");
|
|
|
8
8
|
const test_helper_1 = require("./test-helper");
|
|
9
9
|
describe('dependency injection', () => {
|
|
10
10
|
it('invokes main function', async () => {
|
|
11
|
-
const greetings = await __1.main();
|
|
11
|
+
const greetings = await (0, __1.main)();
|
|
12
12
|
// Trim date headers
|
|
13
|
-
test_helper_1.assertGreetings(greetings);
|
|
13
|
+
(0, test_helper_1.assertGreetings)(greetings);
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=dependency-injection.integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-injection.integration.js","sourceRoot":"","sources":["../../../src/__tests__/integration/dependency-injection.integration.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;AAEhE,6BAA2B;AAC3B,+CAA8C;AAE9C,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,SAAS,GAAa,MAAM,QAAI,
|
|
1
|
+
{"version":3,"file":"dependency-injection.integration.js","sourceRoot":"","sources":["../../../src/__tests__/integration/dependency-injection.integration.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;AAEhE,6BAA2B;AAC3B,+CAA8C;AAE9C,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,SAAS,GAAa,MAAM,IAAA,QAAI,GAAE,CAAC;QACzC,oBAAoB;QACpB,IAAA,6BAAe,EAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -8,11 +8,11 @@ exports.generateBundle = exports.assertGreetings = void 0;
|
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
9
|
const testlab_1 = require("@loopback/testlab");
|
|
10
10
|
const events_1 = require("events");
|
|
11
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
+
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
12
12
|
const runShell = require('@loopback/build').runShell;
|
|
13
13
|
function assertGreetings(greetings) {
|
|
14
14
|
greetings = greetings.map(g => g.replace(/\[[^\[\]]+\] /, ''));
|
|
15
|
-
testlab_1.expect(greetings).to.eql([
|
|
15
|
+
(0, testlab_1.expect)(greetings).to.eql([
|
|
16
16
|
'(en) Hello, Jane!',
|
|
17
17
|
'Hello, John!',
|
|
18
18
|
'(zh) 你好,John!',
|
|
@@ -25,7 +25,7 @@ function generateBundle(type) {
|
|
|
25
25
|
stdio: 'ignore',
|
|
26
26
|
cwd: path_1.default.join(__dirname, '../../..'),
|
|
27
27
|
});
|
|
28
|
-
return events_1.once(child, 'close');
|
|
28
|
+
return (0, events_1.once)(child, 'close');
|
|
29
29
|
}
|
|
30
30
|
exports.generateBundle = generateBundle;
|
|
31
31
|
//# sourceMappingURL=test-helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-helper.js","sourceRoot":"","sources":["../../../src/__tests__/integration/test-helper.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,+CAAyC;AACzC,mCAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"test-helper.js","sourceRoot":"","sources":["../../../src/__tests__/integration/test-helper.ts"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yCAAyC;AACzC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,+CAAyC;AACzC,mCAA4B;AAC5B,6DAAwB;AAExB,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC;AAErD,SAAgB,eAAe,CAAC,SAAmB;IACjD,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/D,IAAA,gBAAM,EAAC,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC;QACvB,mBAAmB;QACnB,cAAc;QACd,eAAe;QACf,mBAAmB;KACpB,CAAC,CAAC;AACL,CAAC;AARD,0CAQC;AAED,SAAgB,cAAc,CAAC,IAAoB;IACjD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,iBAAiB,IAAI,EAAE,CAAC,EAAE;QAC9D,KAAK,EAAE,QAAQ;QACf,GAAG,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;KACtC,CAAC,CAAC;IACH,OAAO,IAAA,aAAI,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC;AAND,wCAMC"}
|