From 717b2bddb8eabc81dc28d2139ce1f3a2e67c2013 Mon Sep 17 00:00:00 2001 From: John Riordan Date: Mon, 24 Oct 2022 10:37:19 -0400 Subject: [PATCH] Migration doc addition --- docs/migration-0.20-0.21.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/migration-0.20-0.21.md b/docs/migration-0.20-0.21.md index 868dab7e5..77168aeb8 100644 --- a/docs/migration-0.20-0.21.md +++ b/docs/migration-0.20-0.21.md @@ -2,13 +2,22 @@ ## General -First off, the entire project was updated for ECMAScript module (ESM) support. Overall this makes the library more compatible and standard usages of the built library are backwards compatible (for example, if installing it via npm has been working for you it will continue to work). However if you are using a custom build or development process then this change may impact those processes... +First off, the entire project was updated for ECMAScript module (ESM) support. Overall this makes the library more compatible and standard usages of the built library are backwards compatible (for example, if installing it via npm has been working for you it will continue to work). However if you are using a custom build or development process or fork of this library then this change may impact those processes. In particular, the TypeScript compilier options `module` and `moduleResolution` for this project have been changed to `NodeNext` for this project... +``` + "compilerOptions": { + ... + "module": "NodeNext", + "moduleResolution": "NodeNext", + ... + }, +``` +... and as such all imports need to be fully specified going forward. For example, `import "../api";` now must be `import "../api/index.js";`. The changes to project which have been made in this regard include... + - fully specified all imports - added .js extensions to all imports - changed compiler options to NodeNext - tweaked webpack configs (removed fullySpecified: false) - Secondly, the [SimpleUser](./simple-user.md) class has been ported from utilizing the API directly to using the [SessionManager](./session-manager.md) class (which is in turn is utilizing the API directly). The interface and usage of `SimpleUser` is completely identical (well, see below for the one breaking change), but if you were utilizing private methods, private properties, or otherwise depending on the internals of SimpleUser you may have issues. Other changes: