Skip to content

Commit 092b520

Browse files
author
HugoFara
committed
chore: updating package.json
1 parent 9f42076 commit 092b520

File tree

2 files changed

+59
-35
lines changed

2 files changed

+59
-35
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,20 +210,32 @@ You can use it through `php tools/phpDocumentor` if installed with [Phive](https
210210
Code documentation for JavaScript is available at `docs/js/` is is generated thourgh [JSDoc](https://jsdoc.app/).
211211
The JSDoc configuration file is `jsdoc.json`.
212212

213-
## New version
213+
## New Version
214214

215215
LWT-fork follows a strict procedure for new versions.
216-
This section is mainly intended for the maintainers, but feel free to take a peak at it.
216+
This section is mainly intended for the maintainers, but feel free to take a peek at it.
217217

218-
The steps to publish a new version are:
218+
### Version Locations
219219

220-
1. In the [CHANGELOG](./CHANGELOG.md), add the latest release number and date.
221-
2. In `src/backend/Core/version.php`, update `LWT_APP_VERSION` and `LWT_RELEASE_DATE`.
220+
The version number must be updated in multiple places:
221+
222+
| File | Field/Constant |
223+
| --- | --- |
224+
| `src/backend/Core/ApplicationInfo.php` | `VERSION` and `RELEASE_DATE` constants |
225+
| `package.json` | `version` field |
226+
| `CHANGELOG.md` | New version section header |
227+
228+
The authoritative version is in `ApplicationInfo.php`. The `package.json` version should match (without the `-fork` suffix).
229+
230+
### Release Steps
231+
232+
1. Update the version in all locations listed above.
233+
2. In the [CHANGELOG](./CHANGELOG.md), move items from `[UNRELEASED]` to the new version section with the release date.
222234
3. Build frontend assets with `npm run build:all`.
223235
4. Regenerate documentation with `composer doc`.
224-
5. Commit your changes, `git commit -m "Regenerates documentation for release []."`
225-
6. Add a version tag with annotation `git tag -a [release number]` and push the changes.
226-
7. If all the GitHub actions are successful, write a new release on GitHub linking to the previously created tag.
236+
5. Commit your changes: `git commit -m "Release [version]"`
237+
6. Add a version tag with annotation: `git tag -a v[version] -m "Release [version]"` and push with `git push --tags`.
238+
7. If all GitHub Actions pass, create a new release on GitHub linking to the tag.
227239
8. The new version is live!
228240

229241
## Other Ways of Contribution

package.json

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,63 @@
11
{
22
"name": "lwt",
3-
"version": "1.0.0",
4-
"description": "NPM package for hugofara/LWT, a fork of LWT",
3+
"version": "2.10.0",
4+
"description": "Learning with Texts - A self-hosted language learning application for reading-based vocabulary acquisition",
5+
"type": "module",
56
"main": "index.js",
7+
"homepage": "https://hugofara.github.io/lwt/",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/HugoFara/lwt.git"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/HugoFara/lwt/issues"
14+
},
15+
"author": {
16+
"name": "HugoFara",
17+
"url": "https://github.com/HugoFara"
18+
},
19+
"contributors": [
20+
{
21+
"name": "lang-learn-guy",
22+
"url": "https://sourceforge.net/u/lang-learn-guy/profile/"
23+
}
24+
],
25+
"license": "Unlicense",
26+
"keywords": [
27+
"lwt",
28+
"language-learning",
29+
"spaced-repetition",
30+
"vocabulary",
31+
"reading",
32+
"self-hosted",
33+
"education"
34+
],
35+
"engines": {
36+
"node": ">=18.0.0"
37+
},
638
"directories": {
739
"doc": "docs",
840
"test": "tests"
941
},
1042
"scripts": {
11-
"test": "vitest run",
12-
"test:watch": "vitest",
13-
"test:coverage": "vitest run --coverage",
1443
"dev": "vite",
1544
"build": "vite build",
1645
"build:themes": "node scripts/build-themes.js",
1746
"build:all": "npm run build && npm run build:themes",
47+
"preview": "vite preview",
48+
"test": "vitest run",
49+
"test:watch": "vitest",
50+
"test:coverage": "vitest run --coverage",
1851
"lint": "eslint .",
1952
"lint:fix": "eslint . --fix",
20-
"preview": "vite preview",
2153
"typecheck": "tsc --noEmit",
54+
"e2e": "cypress run",
2255
"cy:open": "cypress open",
2356
"cy:run": "cypress run",
24-
"e2e": "cypress run",
2557
"docs:dev": "node scripts/docs-pre-build.js && vitepress dev docs-src",
2658
"docs:build": "node scripts/docs-pre-build.js && vitepress build docs-src",
2759
"docs:preview": "vitepress preview docs-src"
2860
},
29-
"type": "module",
30-
"repository": {
31-
"type": "git",
32-
"url": "git+https://github.com/HugoFara/lwt.git"
33-
},
34-
"keywords": [
35-
"lwt",
36-
"language",
37-
"learning",
38-
"spaced-repetition",
39-
"system",
40-
"web",
41-
"reader"
42-
],
43-
"author": "lang-learn-guy, hugofara",
44-
"license": "Unlicense",
45-
"bugs": {
46-
"url": "https://github.com/HugoFara/lwt/issues"
47-
},
48-
"homepage": "https://github.com/HugoFara/lwt#readme",
4961
"dependencies": {
5062
"@yaireo/tagify": "^4.35.6",
5163
"alpinejs": "^3.15.2",

0 commit comments

Comments
 (0)