@appsemble/sdk 0.20.13 → 0.20.15
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/README.md +4 -4
- package/index.test.js +3 -3
- package/index.test.js.map +1 -1
- package/index.test.ts +3 -3
- package/jest.config.js +3 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#  Appsemble SDK
|
|
2
2
|
|
|
3
3
|
> Build your own blocks
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@appsemble/sdk)
|
|
6
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.20.15)
|
|
7
|
+
[](https://codecov.io/gl/appsemble/appsemble)
|
|
8
8
|
[](https://prettier.io)
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
@@ -144,5 +144,5 @@ declare module '@appsemble/sdk' {
|
|
|
144
144
|
|
|
145
145
|
## License
|
|
146
146
|
|
|
147
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.
|
|
147
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.15/LICENSE.md) ©
|
|
148
148
|
[Appsemble](https://appsemble.com)
|
package/index.test.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { bootstrap } from '.';
|
|
1
|
+
import { bootstrap } from './index.js';
|
|
2
2
|
let event;
|
|
3
3
|
let originalCurrentScript;
|
|
4
4
|
beforeEach(() => {
|
|
5
5
|
originalCurrentScript = document.currentScript;
|
|
6
6
|
Object.defineProperty(document, 'currentScript', {
|
|
7
7
|
value: {
|
|
8
|
-
dispatchEvent: jest.fn((e) => {
|
|
8
|
+
dispatchEvent: import.meta.jest.fn((e) => {
|
|
9
9
|
event = e;
|
|
10
10
|
}),
|
|
11
11
|
},
|
|
@@ -21,7 +21,7 @@ afterEach(() => {
|
|
|
21
21
|
});
|
|
22
22
|
describe('bootstrap', () => {
|
|
23
23
|
it('should dispatch the AppsembleBoostrap event', () => {
|
|
24
|
-
const fn = jest.fn();
|
|
24
|
+
const fn = import.meta.jest.fn();
|
|
25
25
|
bootstrap(fn);
|
|
26
26
|
expect(document.currentScript.dispatchEvent).toHaveBeenCalledWith(new CustomEvent(''));
|
|
27
27
|
expect(event.type).toBe('AppsembleBootstrap');
|
package/index.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,IAAI,KAAkB,CAAC;AACvB,IAAI,qBAA6C,CAAC;AAElD,UAAU,CAAC,GAAG,EAAE;IACd,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC;IAC/C,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,eAAe,EAAE;QAC/C,KAAK,EAAE;YACL,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;gBACvC,KAAK,GAAG,CAAC,CAAC;YACZ,CAAC,CAAC;SACH;QACD,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAS,CAAC,GAAG,EAAE;IACb,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,eAAe,EAAE;QAC/C,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,qBAAqB,GAAG,SAAS,CAAC;AACpC,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACjC,SAAS,CAAC,EAAE,CAAC,CAAC;QACd,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,oBAAoB,CAAC,IAAI,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC;QACvF,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC9C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/index.test.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bootstrap } from '.';
|
|
1
|
+
import { bootstrap } from './index.js';
|
|
2
2
|
|
|
3
3
|
let event: CustomEvent;
|
|
4
4
|
let originalCurrentScript: HTMLOrSVGScriptElement;
|
|
@@ -7,7 +7,7 @@ beforeEach(() => {
|
|
|
7
7
|
originalCurrentScript = document.currentScript;
|
|
8
8
|
Object.defineProperty(document, 'currentScript', {
|
|
9
9
|
value: {
|
|
10
|
-
dispatchEvent: jest.fn((e) => {
|
|
10
|
+
dispatchEvent: import.meta.jest.fn((e) => {
|
|
11
11
|
event = e;
|
|
12
12
|
}),
|
|
13
13
|
},
|
|
@@ -25,7 +25,7 @@ afterEach(() => {
|
|
|
25
25
|
|
|
26
26
|
describe('bootstrap', () => {
|
|
27
27
|
it('should dispatch the AppsembleBoostrap event', () => {
|
|
28
|
-
const fn = jest.fn();
|
|
28
|
+
const fn = import.meta.jest.fn();
|
|
29
29
|
bootstrap(fn);
|
|
30
30
|
expect(document.currentScript.dispatchEvent).toHaveBeenCalledWith(new CustomEvent(''));
|
|
31
31
|
expect(event.type).toBe('AppsembleBootstrap');
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/sdk",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.15",
|
|
4
4
|
"description": "Build your own blocks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"license": "LGPL-3.0-only",
|
|
24
24
|
"author": "Appsemble <info@appsemble.com> (https://appsemble.com)",
|
|
25
25
|
"sideEffects": false,
|
|
26
|
+
"type": "module",
|
|
26
27
|
"files": [
|
|
27
28
|
"**/*.d.ts",
|
|
28
29
|
"**/*.js",
|
|
@@ -30,10 +31,10 @@
|
|
|
30
31
|
],
|
|
31
32
|
"scripts": {
|
|
32
33
|
"prepack": "tsc --noEmit false",
|
|
33
|
-
"test": "jest"
|
|
34
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@appsemble/types": "0.20.
|
|
37
|
+
"@appsemble/types": "0.20.15",
|
|
37
38
|
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
38
39
|
"type-fest": "^2.0.0"
|
|
39
40
|
}
|