Skip to content

Commit

Permalink
feat: yarn to pnpm (#8)
Browse files Browse the repository at this point in the history
* feat: yarn to pnpm

* hotfix: example.ymlの消失

resolve #1
  • Loading branch information
cffnpwr authored Feb 14, 2023
1 parent 5f59260 commit 1b02019
Show file tree
Hide file tree
Showing 23 changed files with 13,155 additions and 17,348 deletions.
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Thank you for your PR! Before creating a PR, please check the following:
- Check if there are any documents that need to be created or updated due to this change.
- If you have added a feature or fixed a bug, please add a test case if possible.
- Please make sure that tests and Lint are passed in advance.
- You can run it with `npm run test` and `npm run lint`. [See more info](#testing)
- You can run it with `pnpm run test` and `pnpm run lint`. [See more info](#testing)
- If this PR includes UI changes, please attach a screenshot in the text.

Thanks for your cooperation 🤗
Expand Down Expand Up @@ -99,7 +99,7 @@ If your language is not listed in Crowdin, please open an issue.
![Crowdin](https://d322cqt584bo4o.cloudfront.net/misskey/localized.svg)

## Development
During development, it is useful to use the `npm run dev` command.
During development, it is useful to use the `pnpm run dev` command.
This command monitors the server-side and client-side source files and automatically builds them if they are modified.
In addition, it will also automatically start the Misskey server process.

Expand All @@ -119,7 +119,7 @@ Alternatively, prepare an empty (data can be erased) DB and edit `.config/test.y

Run all test.
```
npm run test
pnpm run test
```

#### Run specify test
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ COPY . ./
RUN apt-get update
RUN apt-get install -y build-essential
RUN git submodule update --init
RUN yarn install
RUN yarn build
RUN rm -rf .git
RUN npm i -g pnpm
RUN pnpm install
RUN pnpm build


FROM node:16.15.1-bullseye-slim AS runner

WORKDIR /misskey

RUN apt-get update
RUN apt-get install -y ffmpeg tini
RUN apt-get update && apt-get install -y ffmpeg tini && npm i -g pnpm

COPY --from=builder /misskey/node_modules ./node_modules
COPY --from=builder /misskey/built ./built
Expand Down
36 changes: 21 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,33 @@
"url": "https://github.com/taiyme/misskey.git"
},
"private": true,
"packageManager": "pnpm@7.27.0",
"workspaces": [
"packages/client",
"packages/backend",
"packages/sw"
],
"scripts": {
"postinstall": "node ./scripts/install-packages.js",
"build": "node ./scripts/build.js",
"build-pre": "node ./scripts/build-pre.js",
"build": "pnpm build-pre && pnpm -r build && pnpm gulp",
"start": "cd packages/backend && node --experimental-json-modules ./built/index.js",
"start:test": "cd packages/backend && cross-env NODE_ENV=test node --experimental-json-modules ./built/index.js",
"init": "npm run migrate",
"migrate": "cd packages/backend && npx typeorm migration:run -d ormconfig.js",
"migrateandstart": "npm run migrate && npm run start",
"gulp": "gulp build",
"watch": "npm run dev",
"init": "pnpm migrate",
"migrate": "cd packages/backend && pnpm migrate",
"migrateandstart": "pnpm migrate && pnpm start",
"gulp": "pnpm exec gulp build",
"watch": "pnpm dev",
"dev": "node ./scripts/dev.js",
"lint": "node ./scripts/lint.js",
"cy:open": "cypress open --browser --e2e --config-file=cypress.config.ts",
"cy:run": "cypress run",
"e2e": "start-server-and-test start:test http://localhost:61812 cy:run",
"lint": "pnpm -r lint",
"cy:open": "pnpm cypress open --browser --e2e --config-file=cypress.config.ts",
"cy:run": "pnpm cypress run",
"e2e": "pnpm start-server-and-test start:test http://localhost:61812 cy:run",
"mocha": "cd packages/backend && cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" npx mocha",
"test": "npm run mocha",
"format": "gulp format",
"test": "pnpm run mocha",
"format": "pnpm exec gulp format",
"clean": "node ./scripts/clean.js",
"clean-all": "node ./scripts/clean-all.js",
"cleanall": "npm run clean-all"
"cleanall": "pnpm clean-all"
},
"dependencies": {
"execa": "5.1.1",
Expand All @@ -47,4 +53,4 @@
"start-server-and-test": "1.14.0",
"typescript": "4.8.3"
}
}
}
23 changes: 23 additions & 0 deletions packages/backend/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"experimental": {
"keepImportAssertions": true
},
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"target": "es2021"
},
"minify": false
}
1 change: 0 additions & 1 deletion packages/backend/.yarnrc

This file was deleted.

10 changes: 8 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"private": true,
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json",
"build": "swc src -d built -D",
"migrate": "pnpm typeorm migration:run -d ormconfig.js",
"watch": "node watch.mjs",
"lint": "eslint --quiet \"src/**/*.ts\"",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
Expand All @@ -17,14 +18,18 @@
"@tensorflow/tfjs-node": "3.20.0"
},
"dependencies": {
"@bull-board/api": "4.2.2",
"@bull-board/koa": "4.2.2",
"@bull-board/ui": "4.2.2",
"@discordapp/twemoji": "14.0.2",
"@elastic/elasticsearch": "7.11.0",
"@koa/cors": "3.1.0",
"@koa/multer": "3.0.0",
"@koa/router": "9.0.1",
"@peertube/http-signature": "1.7.0",
"@sinonjs/fake-timers": "9.1.2",
"@swc/cli": "0.1.61",
"@swc/core": "1.3.35",
"@syuilo/aiscript": "0.11.1",
"ajv": "8.11.0",
"archiver": "5.3.1",
Expand Down Expand Up @@ -78,6 +83,7 @@
"node-fetch": "3.2.10",
"nodemailer": "6.7.8",
"nsfwjs": "2.4.2",
"oauth": "0.10.0",
"os-utils": "0.0.14",
"parse5": "7.1.1",
"pg": "8.8.0",
Expand Down Expand Up @@ -175,4 +181,4 @@
"execa": "6.1.0",
"typescript": "4.8.3"
}
}
}
Loading

0 comments on commit 1b02019

Please sign in to comment.