Closed ghost closed 2 years ago
I wish there was a way to get rid of the .js on import statements.
I'm totally with you on this. There is a way to get rid of it, but it involves an experimental flag which may not be supported in the future, so the most forward-looking approach is just to include the .js.
Resolves #52 Resolves #69
Summary of Changes:
.js
extension when importing local components.index.js
where all the components of the library have been re-exported. Dependents of this library need to update their imports to be shallow imports rather than deep imports.import { Logger } from 'protocol-common/logger';
should now beimport { Logger } from 'protocol-common';
index.js
for the validation sub-libraryindex.d.ts
index.d.ts
for the validation sub-libraryapp.useLogger()
function use NestJS dependency injection to retrieve the ProtocolLogger.@nest/axios
version or update their dependencies every time protocol-common updates. This is not technically a breaking change because the old way of working with the library will still work, it's just deprecated.@nest/axios
to the latest version.Has been tested locally using
npm link
againstprotocol-aries
andaries-key-guardian
. This version should still be considered experimental as it has not yet been fully tested against components that haveprotocol-aries
as a dependency.Still TODO is to update documentation on how to use this. This has been held off on until these changes can be considered as no longer experimental.