diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..6b8a964 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,67 @@ +name: Bug Report +description: Create a bug report +labels: ['bug'] +body: + - type: markdown + attributes: + value: | + Before opening a new issue: + + - Do a search of existing issues. + - Pull the latest updates from this repository's `dev` branch. + + - type: textarea + attributes: + label: To Reproduce + description: A step-by-step description of how to reproduce the issue, or a link to the reproducible repository. + placeholder: | + 1. Start the application in development (npm run dev) + 2. Press enter + 3. An error appears: "❌ MongoDB connection error MongooseServerSelectionError: getaddrinfo ENOTFOUND db-ph-regions" + validations: + required: true + + - type: textarea + attributes: + label: Current vs. Expected behavior + description: A clear and concise description of what the bug is, and what you expected to happen. + placeholder: 'Following the steps from the previous section, I expected A to happen, but I observed B instead' + validations: + required: true + + - type: textarea + attributes: + label: Provide environment information + description: Please run `npm run info` in the root directory of your project and paste the results. + render: bash + placeholder: | + Node version: v24.11.0 + Platform: win32 + Arch: x64 + V8 version: 13.6.233.10-node.28 + npm version: 11.6.1 + validations: + required: true + + - type: dropdown + attributes: + label: Which area(s) are affected? (Select all that apply) + multiple: true + options: + - 'Not sure' + - 'REST API' + - 'Local development' + - 'API documentation' + - 'Database querying' + - 'Open API files (json, yml)' + - 'Others' + validations: + required: true + + - type: textarea + attributes: + label: Additional context + description: | + Any extra information that might help us investigate. + placeholder: | + I tested my reproduction against different `mongoose` releases, and the first one that introduced the bug was "v9.4.1", since reverting to "v8.16.5" works. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..5aa9ac8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,36 @@ +name: Feature Request +description: Suggest a new feature or improvement to the project +labels: ['enhancement'] +body: + - type: textarea + attributes: + label: What problem will this feature address? + description: A clear and concise description of what the problem is. + placeholder: | + I'm always frustrated when I can't do X + validations: + required: true + + - type: textarea + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + placeholder: Add X to the core + validations: + required: true + + - type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + placeholder: | + Maybe use Y as a workaround? + validations: + required: true + + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..715244b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ +## Summary + + +## Related Issues + + +## Type of Change +- [ ] Bug fix +- [ ] New feature +- [ ] Breaking change +- [ ] Refactor +- [ ] Documentation +- [ ] Other (please describe): + +## Checklist +- [ ] I have read the [CONTRIBUTING.md](https://github.com/weaponsforge/ph-regions/blob/dev/CONTRIBUTING.md) +- [ ] My code follows the CODE STYLE ([folder structure](https://github.com/weaponsforge/ph-regions/blob/dev/README.md#-project-folder-structure), [new endpoints](https://github.com/weaponsforge/ph-regions/blob/dev/README.md#%EF%B8%8F-adding-new-endpoints), [code formatting](https://github.com/weaponsforge/ph-regions/blob/dev/server/eslint.config.mjs)) of this project +- [ ] I have added tests where applicable +- [ ] I have tested my changes locally +- [ ] I have linked relevant issues +- [ ] I have added screenshots for UI changes (if applicable) + +## Screenshots (if applicable) + + +## Additional Context + diff --git a/README.md b/README.md index 91261b5..620e9e6 100644 --- a/README.md +++ b/README.md @@ -301,6 +301,10 @@ Runs type-checking without generating the JavaScript or declaration files from t Watches file changes in `.ts` files using the `tsc --watch` option. +### `npm run info` + +Logs the installed Node.js and npm version, environment platform, architecture and V8 version. + ### `npm run lint` Lints TypeScript source codes. diff --git a/server/package.json b/server/package.json index 12589f7..285c6ce 100644 --- a/server/package.json +++ b/server/package.json @@ -22,7 +22,8 @@ "seed": "tsx ./src/scripts/seed/main.ts", "docker:dev": "nodemon --config nodemon.debug.json", "docker:seed:debug": "tsx --inspect=0.0.0.0:9229 ./src/scripts/seed/main.ts", - "docker:watch:win": "tsc -p tsconfig.json --watch --watchFile dynamicPriorityPolling --watchDirectory dynamicPriorityPolling" + "docker:watch:win": "tsc -p tsconfig.json --watch --watchFile dynamicPriorityPolling --watchDirectory dynamicPriorityPolling", + "info": "tsx ./src/scripts/envinfo.ts" }, "author": "weaponsforge", "license": "MIT", diff --git a/server/src/scripts/envinfo.ts b/server/src/scripts/envinfo.ts new file mode 100644 index 0000000..bdc6b66 --- /dev/null +++ b/server/src/scripts/envinfo.ts @@ -0,0 +1,16 @@ +import { execSync } from 'child_process' + +const main = () => { + console.log('Node version:', process.version) + console.log('Platform:', process.platform) + console.log('Arch:', process.arch) + console.log('V8 version:', process.versions.v8) + + try { + console.log('npm version:', execSync('npm -v').toString().trim()) + } catch { + console.log('npm version: unavailable') + } +} + +main()