Skip to content

Commit 2d95a6d

Browse files
committed
docs: added note for upgrading for plugins
1 parent 4278aa7 commit 2d95a6d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

UPGRADING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ Here is a complete list of the underlying changes made:
5555

5656
* If you are on Node version <= v12.20.0, please upgrade to the latest Node v12, but preferably please upgrade to the latest Node LTS (at the time of this writing it is Node v16, but if you can't upgrade to Node v16, at least upgrade to Node v14). Node v12 is EOL as of April 2022.
5757

58+
* Plugins will need to now `return init()` if you override the `init` function, for example (this is the change we had to make in `@breejs/ts-worker`):
59+
60+
```diff
61+
// define accepted extensions
62+
Bree.prototype.init = function () {
63+
if (!this.config.acceptedExtensions.includes('.ts'))
64+
this.config.acceptedExtensions.push('.ts');
65+
66+
- oldInit.bind(this)();
67+
+ return oldInit.bind(this)();
68+
};
69+
```
70+
5871

5972
## Upgrading from v7 to v8
6073

0 commit comments

Comments
 (0)