Skip to content

Commit

Permalink
chore: willboosterify this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
WillBooster-bot committed Nov 20, 2024
1 parent f9c68fc commit e164628
Show file tree
Hide file tree
Showing 7 changed files with 523 additions and 487 deletions.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Close #<IssueNumber>
- Test command (e.g., `yarn test`) is passed.
- Lint command (e.g., `yarn lint`) is passed.
- [ ] I've reviewed my changes on GitHub PR's diff view. (GitHub上で自分の変更内容を確認した。)
- [ ] I've written the steps to test. (テスト手順を記載した。)
- [ ] I've written the steps to test your changes. (テスト手順を記載した。)
- [ ] I've added screenshots. (UIを変更した場合、スクリーンショットを追加した。)
- You may leave this box unchecked if you didn't modify the UI.

Expand All @@ -20,12 +20,12 @@ Close #<IssueNumber>
| <img src="" width="400"> | <img src="" width="400"> |
-->

<!-- Please add steps to test your changes.
## Steps to Test
1. Open http://localhost-exercode.willbooster.net:3000/ja-JP/courses/_example/lessons/_example_a_plus_b/problems/_example_a_plus_b after login.
2. Select the language `C`.
3. Write the following code:

```c
#include <stdio.h>
Expand All @@ -37,8 +37,8 @@ Close #<IssueNumber>
return 0;
}
```
4. Push `Submit` button.
5. ...
-->

<!-- 日本語で記述しても大丈夫です。 -->
12 changes: 12 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const fs = require('fs');
const path = require('path');
const micromatch = require('micromatch');

Expand All @@ -19,4 +20,15 @@ module.exports = {
}
return commands;
},
'./**/migration.sql': (files) => {
for (const file of files) {
const content = fs.readFileSync(file, 'utf-8');
if (content.includes('Warnings:')) {
return [
`!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`,
];
}
}
return [];
},
};
2 changes: 1 addition & 1 deletion .yarn/plugins/plugin-auto-install.cjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"use strict";var n={name:"plugin-auto-install",factory:n=>{const t=n("child_process"),e=n("crypto"),c=n("fs"),r=n("path"),o="plugin-auto-install v2.0.1";let i=!1,s="";function a(n){try{const t=e.createHash("sha256"),o=r.join(n.cwd,"yarn.lock");c.statSync(o,{throwIfNoEntry:!1})&&t.update(c.readFileSync(o,"utf8"));for(const e of n.workspaces.map((n=>n.cwd)).sort()){const n=r.join(e,"package.json"),o=JSON.parse(c.readFileSync(n,"utf8")),i=Object.keys(o).filter((n=>n.endsWith("ependencies"))),s=[];for(const n of i)s.push(...Object.entries(o[n]).map((([n,t])=>`${n}: ${t}`)));t.update(s.sort().join(","))}return t.digest("hex")}catch{}}function l(n){try{const t=d(n);return c.readFileSync(r.join(t,"hash"),"utf8")}catch{}}function u(n,t){if(!n||n===s)return!1;try{const e=d(t);c.mkdirSync(e,{recursive:!0}),c.writeFileSync(r.join(e,"hash"),n),c.writeFileSync(r.join(e,".gitignore"),".gitignore\nhash"),console.info(`${o} updated dependency hash: ${n}`),s=n}catch{}return!0}function d(n){return r.join(n.cwd,".yarn","plugins","plugin-auto-install")}return{hooks:{validateProject(n){i=!0;const t=a(n);t&&t===l(n)||u(t,n)},afterAllInstalled(n){i=!1;const t=a(n);t&&t===l(n)||u(t,n)},async setupScriptEnvironment(n,e){if(!i)try{const c=a(n);if(c&&c===l(n))return;if(!u(c,n))return;console.info(`${o} is running 'yarn install' due to dependency changes.`),t.spawnSync("yarn",["install"],{cwd:n.cwd,env:e}),console.info(`${o} finished 'yarn install'.`)}catch{}}}}}};module.exports=n;
"use strict";var n={name:"plugin-auto-install",factory:n=>{const t=n("child_process"),e=n("crypto"),c=n("fs"),r=n("path"),o="plugin-auto-install v2.0.2";let i=!1,s="";function a(n){try{const t=e.createHash("sha256"),o=r.join(n.cwd,"yarn.lock");c.statSync(o,{throwIfNoEntry:!1})&&t.update(c.readFileSync(o,"utf8"));for(const e of n.workspaces.map((n=>n.cwd)).sort()){const n=r.join(e,"package.json"),o=JSON.parse(c.readFileSync(n,"utf8")),i=Object.keys(o).filter((n=>n.endsWith("ependencies"))),s=[];for(const n of i)s.push(...Object.entries(o[n]).map((([n,t])=>`${n}: ${t}`)));t.update(s.sort().join(","))}return t.digest("hex")}catch{}}function l(n){try{const t=d(n);return c.readFileSync(r.join(t,"hash"),"utf8")}catch{}}function u(n,t){if(!n||n===s)return!1;try{const e=d(t);c.mkdirSync(e,{recursive:!0}),c.writeFileSync(r.join(e,"hash"),n),c.writeFileSync(r.join(e,".gitignore"),".gitignore\nhash"),console.info(`${o} updated dependency hash: ${n}`),s=n}catch{}return!0}function d(n){return r.join(n.cwd,".yarn","plugins","plugin-auto-install")}return{hooks:{validateProject(n){i=!0;const t=a(n);t&&t===l(n)||u(t,n)},afterAllInstalled(n){i=!1;const t=a(n);t&&t===l(n)||u(t,n)},async setupScriptEnvironment(n,e){if(!i)try{const c=a(n);if(c&&c===l(n))return;if(!u(c,n))return;console.info(`${o} is running 'yarn install' due to dependency changes.`),t.spawnSync("yarn",["install"],{cwd:n.cwd,env:e}),console.info(`${o} finished 'yarn install'.`)}catch{}}}}}};module.exports=n;
//# sourceMappingURL=index.js.map
725 changes: 367 additions & 358 deletions .yarn/releases/yarn-4.4.1.cjs → .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ nmMode: hardlinks-global
nodeLinker: node-modules

plugins:
- checksum: 8b171ee8559cde7c8696b5459b49e19cb8ec2cdf942a6a64107706c803f5f1b9b96ae7378a32240ce5119807ac7cf12cd8dd32313188d2f72a3452d28e9c3e44
- checksum: 38e9c07e39ad26ceca2aad81e352f9827d3f08608a396e7286ee684b0551208b9043ba43811e5757e32867999023c982b719e6ae981cffdf2e48ba0aa42b77ef
path: .yarn/plugins/plugin-auto-install.cjs
spec: 'https://github.com/WillBooster/yarn-plugin-auto-install/releases/download/v2.0.1/index.cjs'
spec: 'https://github.com/WillBooster/yarn-plugin-auto-install/releases/download/v2.0.2/index.cjs'

yarnPath: .yarn/releases/yarn-4.4.1.cjs
yarnPath: .yarn/releases/yarn-4.5.1.cjs
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@
"devDependencies": {
"@types/eslint": "8.56.11",
"@types/jest": "29.5.12",
"@typescript-eslint/eslint-plugin": "8.4.0",
"@typescript-eslint/parser": "8.4.0",
"@typescript-eslint/eslint-plugin": "8.15.0",
"@typescript-eslint/parser": "8.15.0",
"@willbooster/eslint-config-ts": "10.6.1",
"@willbooster/prettier-config": "9.1.3",
"build-ts": "13.1.8",
"conventional-changelog-conventionalcommits": "8.0.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-sort-class-members": "1.20.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-sort-class-members": "1.21.0",
"eslint-plugin-sort-destructure-keys": "2.0.0",
"eslint-plugin-unicorn": "56.0.0",
"husky": "9.1.5",
"eslint-plugin-unicorn": "56.0.1",
"husky": "9.1.7",
"jest": "29.7.0",
"lint-staged": "15.2.10",
"micromatch": "4.0.8",
"pinst": "3.0.0",
"prettier": "3.3.3",
"semantic-release": "23.1.1",
"sort-package-json": "2.10.1",
"sort-package-json": "2.11.0",
"ts-jest": "29.2.5",
"typescript": "5.5.4"
"typescript": "5.6.3"
},
"packageManager": "yarn@4.4.1",
"packageManager": "yarn@4.5.1",
"publishConfig": {
"access": "public"
}
Expand Down
Loading

0 comments on commit e164628

Please sign in to comment.