mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-23 12:51:11 +00:00
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:
parent
cb4f97f610
commit
39f247173d
7 changed files with 2186 additions and 2216 deletions
|
@ -1,4 +1 @@
|
||||||
#!/bin/sh
|
pnpm lint-staged
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
|
||||||
|
|
||||||
yarn lint-staged
|
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
steps:
|
variables:
|
||||||
yarn:
|
- &install_pnpm "corepack enable pnpm"
|
||||||
image: node:alpine
|
|
||||||
commands:
|
|
||||||
- yarn
|
|
||||||
|
|
||||||
yarn_lint:
|
steps:
|
||||||
|
install:
|
||||||
image: node:alpine
|
image: node:alpine
|
||||||
commands:
|
commands:
|
||||||
- yarn lint
|
- *install_pnpm
|
||||||
|
- pnpm i
|
||||||
|
|
||||||
|
lint:
|
||||||
|
image: node:alpine
|
||||||
|
commands:
|
||||||
|
- *install_pnpm
|
||||||
|
- pnpm lint
|
||||||
|
|
||||||
npm_publish:
|
npm_publish:
|
||||||
image: node:alpine
|
image: node:alpine
|
||||||
commands:
|
commands:
|
||||||
|
- *install_pnpm
|
||||||
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
|
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
|
||||||
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
|
- echo "email = tyhou13@gmx.com" >> ~/.npmrc
|
||||||
- npm publish
|
- npm publish
|
||||||
|
|
|
@ -13,7 +13,7 @@ A javascript / typescript http client and type system for [Lemmy](https://github
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
`yarn add lemmy-js-client`
|
`pnpm install lemmy-js-client`
|
||||||
|
|
||||||
## Usage
|
## 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:
|
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
|
# Go to lemmy-js-client dir
|
||||||
yalc publish --push
|
yalc publish --push
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
new_tag="$1"
|
new_tag="$1"
|
||||||
|
|
||||||
yarn version --new-version $new_tag
|
pnpm version $new_tag
|
||||||
git push
|
git push
|
||||||
git tag $new_tag
|
git tag $new_tag
|
||||||
git push origin $new_tag
|
git push origin $new_tag
|
||||||
|
|
53
package.json
53
package.json
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "lemmy-js-client",
|
"name": "lemmy-js-client",
|
||||||
"version": "0.19.2-alpha.3",
|
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
"version": "0.19.3-alpha.6",
|
||||||
"license": "AGPL-3.0",
|
|
||||||
"author": "Dessalines <tyhou13@gmx.com>",
|
"author": "Dessalines <tyhou13@gmx.com>",
|
||||||
|
"license": "AGPL-3.0",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
|
||||||
"files": [
|
"files": [
|
||||||
"/dist"
|
"/dist"
|
||||||
],
|
],
|
||||||
|
@ -14,8 +12,33 @@
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"docs": "typedoc src/index.ts",
|
"docs": "typedoc src/index.ts",
|
||||||
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --ext .js,.ts,.tsx src && prettier --check src",
|
"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": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx,js}": [
|
"*.{ts,tsx,js}": [
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
|
@ -25,26 +48,6 @@
|
||||||
"sortpack"
|
"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": {
|
"importSort": {
|
||||||
".js, .jsx, .ts, .tsx": {
|
".js, .jsx, .ts, .tsx": {
|
||||||
"style": "module",
|
"style": "module",
|
||||||
|
|
2141
pnpm-lock.yaml
Normal file
2141
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue