Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 6115266a authored by Simon Chan's avatar Simon Chan
Browse files

chore: update dependencies

parent d5e62865
Loading
Loading
Loading
Loading
+48 −19
Original line number Diff line number Diff line
## Development

The repository uses [Rush](https://rushjs.io/) for monorepo management.
The repository uses [PNPM](https://pnpm.io/) for monorepo management.

### Install Rush globally
### Install PNPM globally

```sh
$ npm i -g @microsoft/rush
$ npm i -g pnpm
```

### Get code

The build script only works inside a Git repository, so, always use `git` to clone this repository. "Download ZIP" option in GitHub code menu or source code tarball in GitHub releases will NOT work.

```sh
git clone https://github.com/yume-chan/ya-webadb.git
cd ya-webadb
@@ -20,30 +18,61 @@ cd ya-webadb
### Install dependencies

```sh
$ rush install
$ pnpm install
```

### Build all packages

```sh
$ pnpm build
```

### Run all tests

Tests are written using Node.js built-in test runner. Node.js 20.x is used in local development and GitHub Actions, Node.js 22.x might have a regression on parsing source maps.

```sh
$ pnpm test
```

### Everyday commands
### Run ESLint and Prettier

-   Build all packages:
```sh
$ pnpm lint
```

## Update dependencies

```sh
    $ rush build
$ pnpm recursive update --latest --interactive
$ pnpm dedupe
```

-   Watch changes and rebuild in all libraries:
Renovate is also enabled, but since it doesn't update `package.json` files, it's recommended to run the above commands manually.

Run `pnpm build` and `pnpm test` to make sure everything works after updating dependencies.

## Creating Pull Requests

When creating a pull request, use `changeset` command to add a new changelog:

```sh
    $ rush build:watch
$ pnpm changeset
```

Then follow the instructions to select changed packages and write a summary of the changes.

## Release new versions

NPM packages are released using GitHub Actions. Create a new tag and push it to the repository to trigger the release workflow.

```sh
rush version --bump
export NPM_AUTH_TOKEN=... # Copy NPM auth token from ~/.npmrc
rush publish -p --include-all --set-access-level public
rush update # Update lock file
pnpm changeset version
git add -A
git commit -m "chore: release new version"
git push
git tag vX.Y.Z
git push --tags
```

## FAQ
+1 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
    "types": "esm/index.d.ts",
    "scripts": {
        "build": "tsc -b tsconfig.build.json",
        "build:watch": "tsc -b tsconfig.build.json",
        "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4"
    },
    "bin": {
@@ -42,7 +41,7 @@
        "source-map-support": "^0.5.21"
    },
    "devDependencies": {
        "@types/node": "^20.14.11",
        "@types/node": "^20.14.12",
        "@yume-chan/eslint-config": "workspace:^1.0.0",
        "@yume-chan/tsconfig": "workspace:^1.0.0",
        "prettier": "^3.3.3",
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
    "sideEffects": false,
    "scripts": {
        "build": "tsc -b tsconfig.build.json",
        "build:watch": "tsc -b tsconfig.build.json",
        "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4",
        "prepublishOnly": "npm run build"
    },
+1 −2
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
    "sideEffects": false,
    "scripts": {
        "build": "tsc -b tsconfig.build.json",
        "build:watch": "tsc -b tsconfig.build.json",
        "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4",
        "prepublishOnly": "npm run build",
        "test": "run-test"
@@ -39,7 +38,7 @@
        "@yume-chan/struct": "workspace:^0.0.24"
    },
    "devDependencies": {
        "@types/node": "^20.14.11",
        "@types/node": "^20.14.12",
        "@yume-chan/eslint-config": "workspace:^1.0.0",
        "@yume-chan/test-runner": "workspace:^1.0.0",
        "@yume-chan/tsconfig": "workspace:^1.0.0",
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
    "sideEffects": false,
    "scripts": {
        "build": "tsc -b tsconfig.build.json",
        "build:watch": "tsc -b tsconfig.build.json",
        "lint": "run-eslint && prettier src/**/*.ts --write --tab-width 4",
        "prepublishOnly": "npm run build"
    },
Loading