Migrate from yarn to pnpm. (#236)

* Migrate from yarn to pnpm.

* Fixing woodpecker.

* 0.19.3-alpha.3

* Fixing publish.

* 0.19.3-alpha.4

* Upgrading deps.

* 0.19.3-alpha.5

* Fix package.json.

* 0.19.3-alpha.6
This commit is contained in:
Dessalines 2024-01-28 22:08:00 -05:00 committed by GitHub
parent cb4f97f610
commit 39f247173d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 2186 additions and 2216 deletions

View File

@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged
pnpm lint-staged

View File

@ -1,17 +1,23 @@
steps:
yarn:
image: node:alpine
commands:
- yarn
variables:
- &install_pnpm "corepack enable pnpm"
yarn_lint:
steps:
install:
image: node:alpine
commands:
- yarn lint
- *install_pnpm
- pnpm i
lint:
image: node:alpine
commands:
- *install_pnpm
- pnpm lint
npm_publish:
image: node:alpine
commands:
- *install_pnpm
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
- npm publish

View File

@ -13,7 +13,7 @@ A javascript / typescript http client and type system for [Lemmy](https://github
## Installation
`yarn add lemmy-js-client`
`pnpm install lemmy-js-client`
## Usage
@ -38,7 +38,7 @@ let jwt = await client.login(loginForm).jwt;
You can use [yalc](https://github.com/wclr/yalc) to develop and test changes locally:
```
yarn global add yalc
pnpm i --global add yalc
# Go to lemmy-js-client dir
yalc publish --push

View File

@ -2,7 +2,7 @@
new_tag="$1"
yarn version --new-version $new_tag
pnpm version $new_tag
git push
git tag $new_tag
git push origin $new_tag

View File

@ -1,12 +1,10 @@
{
"name": "lemmy-js-client",
"version": "0.19.2-alpha.3",
"description": "A javascript / typescript client for Lemmy",
"repository": "https://github.com/LemmyNet/lemmy-js-client",
"license": "AGPL-3.0",
"version": "0.19.3-alpha.6",
"author": "Dessalines <tyhou13@gmx.com>",
"license": "AGPL-3.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"/dist"
],
@ -14,8 +12,33 @@
"build": "tsc",
"docs": "typedoc src/index.ts",
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src && prettier --check src",
"prepare": "yarn run build && husky install"
"prepare": "pnpm run build && husky"
},
"repository": {
"type": "git",
"url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
},
"dependencies": {
"cross-fetch": "^3.1.5",
"form-data": "^4.0.0"
},
"devDependencies": {
"@types/node": "^20.11.10",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.54.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^9.0.6",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"prettier-plugin-import-sort": "^0.0.7",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-packagejson": "^2.4.6",
"sortpack": "^2.3.5",
"typedoc": "^0.25.7",
"typescript": "^5.3.2"
},
"types": "./dist/index.d.ts",
"lint-staged": {
"*.{ts,tsx,js}": [
"prettier --write",
@ -25,26 +48,6 @@
"sortpack"
]
},
"dependencies": {
"cross-fetch": "^3.1.5",
"form-data": "^4.0.0"
},
"devDependencies": {
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.54.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"prettier-plugin-import-sort": "^0.0.7",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-packagejson": "^2.4.6",
"sortpack": "^2.3.5",
"typedoc": "^0.24.7",
"typescript": "^5.3.2"
},
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",

2141
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

2177
yarn.lock

File diff suppressed because it is too large Load Diff