Skip to content

Commit b005fc2

Browse files
committed
chore: prepare v1.5.5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 30b33d0 commit b005fc2

5 files changed

Lines changed: 66 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [v1.5.5](https://github.com/nextcloud-libraries/nextcloud-vite-config/compare/v1.5.4...v1.5.5) (2025-05-07)
4+
### 🐛 Fixed bugs
5+
* fix(SPDX): handle vite internal modules and sanitize name [\#606](https://github.com/nextcloud-libraries/nextcloud-vite-config/pull/606) \([susnux](https://github.com/susnux)\)
6+
7+
### Changed
8+
* chore(deps-dev): Bump vite to 6.3.4
9+
310
## [v1.5.4](https://github.com/nextcloud-libraries/nextcloud-vite-config/compare/v1.5.3...v1.5.4) (2025-04-29)
411
### Changed
512
* chore(deps): Bump rollup-plugin-esbuild-minify from 1.2.0 to 1.3.0

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ export default createLibConfig({
7878
})
7979
```
8080

81-
## Notes
81+
### Notes
8282

83-
### Inlining / injecting CSS
83+
#### Inlining / injecting CSS
8484
You can enable inlining CSS code, but please note that this is handled differently for apps and libraries.
8585
* Apps will inline the CSS by dynamically inject it as `script` tags
8686
* Libraries will extract the CSS to the dist/assets directory and import it in the entry point
@@ -90,3 +90,27 @@ But this only works in DOM environments, so for libraries this might not work (e
9090

9191
So for libraries the CSS will still be extracted by Vite, but the extracted CSS assets will be imported.
9292
This way the library user can decide how to handle the imported CSS without relying on a DOM environment.
93+
94+
## Development
95+
96+
### 📤 Releasing a new version
97+
98+
- Pull the latest changes from `main` or `stableX`
99+
- Checkout a new branch with the tag name (e.g `v4.0.1`): `git checkout -b v<version>`
100+
- Run `npm version patch --no-git-tag-version` (`npm version minor --no-git-tag-version` if minor).
101+
This will return a new version name, make sure it matches what you expect
102+
- Generate the changelog content from the [release](https://github.com/nextcloud-libraries/nextcloud-vite-config/releases) page.
103+
Create a draft release, select the previous tag, click `generate` then paste the content to the `CHANGELOG.md` file
104+
1. adjust the links to the merged pull requests and authors so that the changelog also works outside of GitHub
105+
by running `npm run prerelease:format-changelog`.
106+
This will apply this regex: `by @([^ ]+) in ((https://github.com/)nextcloud-libraries/nextcloud-vite-config/pull/(\d+))`
107+
Which this as the replacement: `[\#$4]($2) \([$1]($3$1)\)`
108+
2. use the the version as tag AND title (e.g `v4.0.1`)
109+
3. add the changelog content as description (https://github.com/nextcloud-libraries/nextcloud-vite-config/releases)
110+
- Commit, push and create PR
111+
- Get your PR reviewed and merged
112+
- Create a milestone with the follow-up version at https://github.com/nextcloud-libraries/nextcloud-vite-config/milestones
113+
- Move all open tickets and PRs to the follow-up
114+
- Close the milestone of the version you release
115+
- Publish the previously drafted release on GitHub
116+
![image](https://user-images.githubusercontent.com/14975046/124442568-2a952500-dd7d-11eb-82a2-402f9170231a.png)

build/format-changelog.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
3+
* SPDX-License-Identifier: AGPL-3.0-or-later
4+
*/
5+
import { readFile, writeFile } from 'node:fs/promises'
6+
import { join } from 'node:path'
7+
8+
console.info('🔎 checking format of CHANGELOG.md')
9+
10+
const file = join(import.meta.dirname, '..', 'CHANGELOG.md')
11+
const content = await readFile(file, { encoding: 'utf-8' })
12+
13+
const formatted = content
14+
.replaceAll(
15+
/from \d+\.(\d\.?)+ to (\d\.(\d\.?)+) by @dependabot .+/g,
16+
'to $2',
17+
)
18+
.replaceAll(
19+
/by @([^ ]+) in ((https:\/\/github.com\/)nextcloud-libraries\/nextcloud-vite-config\/pull\/(\d+))/g,
20+
'[\\#$4]($2) \\([$1]($3$1)\\)',
21+
)
22+
23+
if (formatted !== content) {
24+
console.info('✏️ fixing format')
25+
await writeFile(file, formatted)
26+
console.info('🎉 done')
27+
} else {
28+
console.info('✅ no formatting needed - done.')
29+
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nextcloud/vite-config",
3-
"version": "1.5.4",
3+
"version": "1.5.5",
44
"description": "Shared Vite configuration for Nextcloud apps and libraries",
55
"homepage": "https://github.com/nextcloud/nextcloud-vite-config",
66
"bugs": {
@@ -29,6 +29,7 @@
2929
"build": "tsc",
3030
"build:doc": "typedoc --out dist/doc lib/index.ts && touch dist/doc/.nojekyll",
3131
"dev": "tsc --watch",
32+
"prerelease:format-changelog": "node build/format-changelog.mjs",
3233
"lint": "eslint lib",
3334
"lint:fix": "eslint --fix lib",
3435
"test": "vitest run",

0 commit comments

Comments
 (0)