@appsemble/preact 0.20.11 → 0.20.14

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 CHANGED
@@ -1,10 +1,10 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.18.23/config/assets/logo.svg) Appsemble Preact SDK
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.20.14/config/assets/logo.svg) Appsemble Preact SDK
2
2
 
3
3
  > Build your own blocks using Preact
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/preact)](https://www.npmjs.com/package/@appsemble/preact)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.18.23/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.18.23)
7
- [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.18.23/graph/badge.svg)](https://codecov.io/gl/appsemble/appsemble)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.20.14/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.20.14)
7
+ [![Code coverage](https://codecov.io/gl/appsemble/appsemble/branch/0.20.14/graph/badge.svg)](https://codecov.io/gl/appsemble/appsemble)
8
8
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
9
9
 
10
10
  ## Installation
@@ -27,9 +27,8 @@ called when the block is done rendering. Actions won’t be finalized for any bl
27
27
  until all blocks are ready.
28
28
 
29
29
  ```tsx
30
- import { useEffect } from 'preact/hooks';
31
-
32
30
  import { bootstrap } from '@appsemble/preact';
31
+ import { useEffect } from 'preact/hooks';
33
32
 
34
33
  bootstrap(({ actions }) => {
35
34
  useEffect(() => {
@@ -53,9 +52,8 @@ Get the block context. This is available for components that are rendered within
53
52
  component rendered by [`bootstrap`](#bootstrap)
54
53
 
55
54
  ```tsx
56
- import { VNode } from 'preact';
57
-
58
55
  import { useBlock } from '@appsemble/preact';
56
+ import { VNode } from 'preact';
59
57
 
60
58
  export function MyButton(): VNode {
61
59
  const { actions } = useBlock();
@@ -73,9 +71,8 @@ export function MyButton(): VNode {
73
71
  This helper component renders a translated message ID.
74
72
 
75
73
  ```tsx
76
- import { VNode } from 'preact';
77
-
78
74
  import { FormattedMessage } from '@appsemble/preact';
75
+ import { VNode } from 'preact';
79
76
 
80
77
  interface MyButtonProps {
81
78
  name: string;
@@ -92,5 +89,5 @@ export function MyButton({ name }: MyButtonProps): VNode {
92
89
 
93
90
  ## License
94
91
 
95
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.18.23/LICENSE.md) ©
92
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.20.14/LICENSE.md) ©
96
93
  [Appsemble](https://appsemble.com)
package/jest.config.js CHANGED
@@ -1 +1,3 @@
1
- module.exports = require('../../config/jest/config')(__dirname);
1
+ import { createJestConfig } from '../../config/jest/config.js';
2
+
3
+ export default createJestConfig(import.meta);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/preact",
3
- "version": "0.20.11",
3
+ "version": "0.20.14",
4
4
  "description": "Build your own blocks using Preact",
5
5
  "keywords": [
6
6
  "app",
@@ -24,6 +24,7 @@
24
24
  "license": "LGPL-3.0-only",
25
25
  "author": "Appsemble <info@appsemble.com> (https://appsemble.com)",
26
26
  "sideEffects": false,
27
+ "type": "module",
27
28
  "files": [
28
29
  "**/*.d.ts",
29
30
  "**/*.js",
@@ -31,10 +32,10 @@
31
32
  ],
32
33
  "scripts": {
33
34
  "prepack": "tsc --noEmit false",
34
- "test": "jest"
35
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest"
35
36
  },
36
37
  "peerDependencies": {
37
- "@appsemble/sdk": "0.20.11",
38
+ "@appsemble/sdk": "0.20.14",
38
39
  "preact": "^10"
39
40
  }
40
41
  }