pinata-proxy v0.0.8
Pinata Proxy
An experiment to understand what happens when we start separating Pinata from ZADev/client
To publish a new version:
- bump the version in
package.json
npm run build
to compile assets into thebuild
directory (and thedist
directory for legacy access).- (publish somewhere - TBD)
Other commands
npm test
npm run lint
Notes
Importing
Due to the nature of how we import Pinata files in ZAdev (eg import {Thing} from
pinata/nested/directory) this was never going to be simple.
Right now, the most "light touch" approach is to alias
pinatato the
dist` directory within the node module, and then navigate into the folder structure.
It's not ideal, as it forces a hard coupling of the internal implementations of the Pinata package and ZADev.
There is also a named barrel export of all the current components.
Finally, Rollup is used to export both ES6 and CommonJS versions of the library, and is the "proper" way to import the components.
Location of Pinata source code
Right now the source code lives within ZADev - but would rely on being published externally and then re-imported into the /client
package to hook in properly. After this proof of concept, this should be moved to a different repository entirely.
Versioning
This currently takes the approach of a single version for the entire library, with patch level version bumps for bugfixes, minor for API additions, and major versions for breaking changes.
The approach of versioning each package separately has also been discussed, and still needs to be technically explored in order ot understand benefits/drawbacks etc
Change Management
Direct implementation depends upon the outcome of the versioning exploration, but right now could live in the root of this app as a CHANGELOG file (TODO)
Dependencies
A major plus point to extracting Pinata is to decouple the dependencies from Zadev. Right now nothing significant has changed, and all versions of babel/eslint plugins are the same as ZAdev/client. Next steps would be to see what would be involved in upgrading Pinata to eg Bable@7 and understand if there are any issues as a result of such a change.