Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release automation #2

Open
juliusknorr opened this issue Apr 19, 2022 · 7 comments
Open

Release automation #2

juliusknorr opened this issue Apr 19, 2022 · 7 comments
Labels
discussion Being discussed

Comments

@juliusknorr
Copy link
Member

juliusknorr commented Apr 19, 2022

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.

@juliusknorr juliusknorr transferred this issue from nextcloud-libraries/nextcloud-moment Apr 19, 2022
@skjnldsv
Copy link
Member

Same for apps releases on https://github.com/nextcloud-releases/

@vinicius73
Copy link
Member

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.

For the build process

About ESM

ESM (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.

About Docs

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.

About NPM and GPR

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.

@skjnldsv
Copy link
Member

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.

@skjnldsv skjnldsv added the discussion Being discussed label Jun 10, 2022
@skjnldsv
Copy link
Member

skjnldsv commented Feb 7, 2024

@susnux I guess we could all move to the vite config?
We should document the requirements here for the final ticket:

  • Mandatory data in package.json
  • Mandatory config files
  • Vite ecosystem recommendations (e.g. vitest)...

@susnux
Copy link

susnux commented Feb 7, 2024

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?

@skjnldsv
Copy link
Member

skjnldsv commented Feb 8, 2024

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 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Being discussed
Projects
None yet
Development

No branches or pull requests

4 participants