Open juliushaertl opened 2 years ago
Same for apps releases on https://github.com/nextcloud-releases/
I took the liberty of creating a gist to track all our NPM Packages.
https://gist.github.com/vinicius73/555d739de02a431fc8a2a33aa4e5cb69
The idea is to improve every package with better docs and a standard release process.
>0.25%, not ie 11, not op_mini all, not dead, Firefox ESR
) All browsers who we support is compatible with the major features of ES2015+Android Browser 4.4.3-4.4.4
, but Since Android 5, the Android webview went evergreen, and has chrome as the default browserESM (EcmaScript Modules) are largely compatible with node and browsers.
It allows tree shaking and modern tooling like Vite, Skypack and Parcel.
It is a big step of JavaScript ecosystem and there are some incompatibilities between CJS and ESM but we can handle it using rollup and adjusting our package.json
and release process.
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"exports": {
"import": "./dist/index.esm.js",
"require": "./dist/index.js"
},
"files": [
"dist/"
],
It keeps every old-style package manager, node version, and bundler working without any issue.
It is very important to make sure we have a good doc with good references about some parts of Nextcloud usage and development.
Packages with poor README.md
files must be revised to make them better.
Nowadays we have NPM and GPR (Github Package Registry) as public options to store and distribute javascripr packages.
The idea is improving the security and resilience of the JS ecosystem. All major npm front-ends (NPM, Yarn, pnpm) are able to use not only other registries, also github repos directly.
Also, we can publish in gitlab too.
Related PR who I've already sent about this.
I created a nice config with typescript, esm, esnext, vue for rollup in https://github.com/nextcloud/nextcloud-upload/blob/master/rollup.config.js Thank you for the help @vinicius73, your configs helped me understand a bit better the process.
Feel free to take inspiration on this. It works great and also generates typings.
@susnux I guess we could all move to the vite config? We should document the requirements here for the final ticket:
Not sure how that is related? Yes I would recommend to use vite for bundling and recommend our shared config - also to get some feedback on how to improve there.
But not sure how this is connected to automated releases?
In my head that was: unifying the config will help having the same release process But you're right, this could be two very distinct steps :see_no_evil:
It would be nice to have the changeling generation and npm releases handled through GitHub actions or at least have some docs on which steps to take. This showed up to be an issue when trying to release
@nextcloud/moment
but is the same for other npm packages we have in our organisation. Only@nextcloud/vue
seems to be automated/documented currently.