Skip to content

Commit

Permalink
Merge branch 'main' into pl-direction
Browse files Browse the repository at this point in the history
  • Loading branch information
hankucz authored Aug 18, 2022
2 parents 7723c98 + a372c8c commit 67d11d8
Show file tree
Hide file tree
Showing 93 changed files with 5,476 additions and 1,512 deletions.
101 changes: 88 additions & 13 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,106 @@
name: "\U0001F41E Bug report"
description: Report an issue
labels: ['s: pending triage'] # This will automatically assign the 's: pending triage' label
labels: ['s: pending triage', 'c: bug']
body:
- type: markdown
attributes:
value: Thanks for taking the time to fill out this bug report!
value: |
Thanks for taking the time to fill out this bug report!
If you are unsure whether your problem is a bug or not, you can check the following:
- use our [Discord community](https://chat.fakerjs.dev)
- open a new [discussion](https://github.com/faker-js/faker/discussions) and ask your question there
- use [StackOverflow using the tag `faker-js`](https://stackoverflow.com/questions/tagged/faker-js)
- type: checkboxes
id: checkboxes
attributes:
label: Pre-Checks
description: Before submitting the issue, please make sure you do the following
options:
- label: Follow our [Code of Conduct](https://github.com/faker-js/faker/blob/main/CODE_OF_CONDUCT.md).
required: true
- label: Read the [Contributing Guidelines](https://github.com/faker-js/faker/blob/main/CONTRIBUTING.md).
required: true
- label: Read the [docs](https://fakerjs.dev/guide).
required: true
- label: Check that there isn't [already an issue](https://github.com/faker-js/faker/issues) that reports the same bug to avoid creating a duplicate.
required: true
- label: Make sure this is a Faker issue and not related to a combination with another package.
required: true
- label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/faker-js/faker/discussions) or join our [Discord Chat Server](https://chat.fakerjs.dev).
required: true
- label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
required: true
- label: I am willing to provide a PR.

- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
placeholder: Bug description
description: A clear and concise description of what the bug is.
placeholder: I am doing ... What I expect is ... What actually happening is ...
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Reproduction
description: Please reproduce the problem you ran into.
placeholder: Reproduction
label: Minimal reproduction code
description: |
An URL to some git repository or gist that reproduces this issue. [Wtf is a minimum reproduction?](https://jmcdo29.github.io/wtf-is-a-minimum-reproduction)
You can also provide a [Faker StackBlitz workspace](https://fakerjs.dev/new) with a reproduction.
Alternatively you could write the code sample directly here with [markdown support.](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)
placeholder: 'https://github.com/..., https://fakerjs.dev/new or ``` code ```'

- type: textarea
id: additional-context
attributes:
label: Additional Context
description: |
Anything else relevant? Please tell us here if you run Faker in a Web Browser.
**Tip:** You can attach images, recordings or log files by clicking this area to highlight it and then dragging files in.
- type: textarea
id: environment-info
attributes:
label: Environment Info
description: Output of `npx envinfo --system --npmPackages '@faker-js/*' --binaries --browsers`
render: shell
placeholder: |
System:
OS: _
CPU: _
Memory: _ / _
Container: Yes/No
Shell: _
Binaries:
Node: _ - /usr/bin/node
Yarn: _ - /usr/bin/yarn
npm: _ - /usr/bin/npm
npmPackages:
@faker-js/faker: _ => _
validations:
required: true
- type: textarea
id: additional-info

- type: checkboxes
id: module-system
attributes:
label: Additional Info
description: Give us additional info like e.g. version numbers.
placeholder: Additional info
label: Which module system do you use?
options:
- label: CJS
- label: ESM

- type: dropdown
id: package-manager
attributes:
label: Used Package Manager
description: Select the used package manager
options:
- npm
- yarn
- pnpm
- other
validations:
required: false
required: true
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- Please first read https://github.com/faker-js/faker/blob/verify-semantic-pull-requests/CONTRIBUTING.md -->

<!-- Help us by writing a correct PR title following this guide: https://github.com/faker-js/faker/blob/verify-semantic-pull-requests/CONTRIBUTING.md#committing -->
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
{
"groupName": "vitest",
"matchPackageNames": ["@vitest/ui", "vitest"]
"matchPackageNames": ["@vitest/coverage-c8", "@vitest/ui", "vitest"]
},
{
"groupName": "prettier",
Expand Down
17 changes: 0 additions & 17 deletions .github/semantic.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@ jobs:
uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
chore
refactor
docs
test
ci
build
infra
revert
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [7.4.0](https://github.com/faker-js/faker/compare/v7.3.0...v7.4.0) (2022-08-08)


### Features

* add rodent breed on animal 'en' locale ([#1136](https://github.com/faker-js/faker/issues/1136)) ([a65f1a2](https://github.com/faker-js/faker/commit/a65f1a2b59b909c4b5cc044af560ff91642c9a56))
* **dev:** add male_first_name,female_first_name, jp locale ([#1217](https://github.com/faker-js/faker/issues/1217)) ([ad885ea](https://github.com/faker-js/faker/commit/ad885eaffd4d95031df1b3a09cead7c18ccd2c5b))
* **image:** add image via.placeholder provider ([#1186](https://github.com/faker-js/faker/issues/1186)) ([00d4741](https://github.com/faker-js/faker/commit/00d4741fb8cde9c2790241654ba375fa6afa4f81))
* **locales.en:** extend vehicle ([#1102](https://github.com/faker-js/faker/issues/1102)) ([07a970f](https://github.com/faker-js/faker/commit/07a970f2e05ef4e04a9d7382ab75fa544fb986d6))
* **locales.pl:** add pl translation for gender and binary gender ([#1162](https://github.com/faker-js/faker/issues/1162)) ([22a050e](https://github.com/faker-js/faker/commit/22a050e86fd4fb04e4232a9e57fb1602fd3944cc))
* **system.fileName:** file extension count ([#1101](https://github.com/faker-js/faker/issues/1101)) ([968134c](https://github.com/faker-js/faker/commit/968134c398a11b698b489a492179080aa7ca8c73))
* **system.networkInterface:** add networkInterface faker ([#1133](https://github.com/faker-js/faker/issues/1133)) ([5979f82](https://github.com/faker-js/faker/commit/5979f82e17d4f9adf80fa795afb668d57b33411f))


### Bug Fixes

* **finance.bic:** remove hardcoded elements and simplify function ([#1171](https://github.com/faker-js/faker/issues/1171)) ([5a397e0](https://github.com/faker-js/faker/commit/5a397e0f8a6b4651a5b093b8eafe4895bf166845))

## [7.3.0](https://github.com/faker-js/faker/compare/v7.2.0...v7.3.0) (2022-06-20)

### New & Noteworthy
Expand Down
106 changes: 105 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Example:

```ts
/**
* @see faker.cat.random
* @see faker.cat.random()
*
* @deprecated Use faker.cat.random() instead.
*/
Expand Down Expand Up @@ -225,3 +225,107 @@ pnpm run docs:serve # Serve docs from /dist
## Deploying documentation

See the [netlify.toml](netlify.toml) for configuration.

## Committing

Pull Request titles need to follow our semantic convention.

PR titles are written in following convention: `type(scope): subject`

**type** is required and indicates the intent of the PR

> The types `feat` and `fix` will be shown in the changelog as `### Features` or `### Bug Fixes`
> All other types wont show up except for breaking changes marked with the `!` in front of `:`
Allowed types are:

| type | description |
| -------- | ------------------------------------------------------------------------- |
| feat | A new feature is introduced |
| fix | A bug was fixed |
| chore | No user affected code changes were made |
| refactor | A refactoring that affected also user (e.g. log a deprecation warning) |
| docs | Docs were changed |
| test | Test were changed |
| ci | CI were changed |
| build | Build scripts were changed |
| infra | Infrastructure related things were made (e.g. issue-template was updated) |
| revert | A revert was triggered via git |

**scope** is optional and indicates the scope of the PR

> The scope will be shown in the changelog in front of the _subject_ in bold text
> Also as the commits are sorted alphabetically, the scope will group the commits indirectly into categories
Allowed scopes are:

| scope | description |
| --------------- | ---------------------------------------------------------------------------- |
| \<module-name\> | The specific module name that was affected by the PR |
| locale | When only locale(s) are added/updated/removed |
| module | When some modules where updates or something related to modules were changed |
| revert | When a revert was made via git |
| deps | Will mostly be used by Renovate |
| release | Will be set by release process |

> The scope is not checkable via `Semantic Pull Request` action as this would limit the scopes to only existing modules,
> but if we add a new module like `color`, then the PR author couldn't use the new module name as scope.
> As such, we (the Faker team) must be mindful of valid scopes and we reserve the right to edit titles as we see fit.
**subject** is required and describes what the PR does

> Please note that the PR title should not include a suffix of e.g. `(#123)` as this will be done automatically by GitHub while merging
Some examples of valid pull request titles:

```shell
feat: add casing option
feat(locale): extend Hebrew (he)
fix: lower target to support Webpack 4
chore: add naming convention rule
refactor(address): deprecate streetPrefix and streetSuffix
docs: remove unused playground
test: validate @see contents
ci: allow breaking change commits
build: add node v18 support
infra: rework bug-report template
revert: add more arabic names dataset (#362)

# Breaking changes
refactor!: remove faker default export
build!: remove node v12 support

# A release PR will look like this
chore(release): 7.4.0

# Renovate automatically generates these
chore(deps): update devdependencies
chore(deps): update typescript-eslint to ~5.33.0
```
Previous pull request titles that could have been written in a better way:
```diff
- feat: `datatype.hexadecimal` signature change
+ feat(datatype): hexadecimal signature change
datatype is one of our modules and can be used as scope

- feat(image): add image via.placeholder provider
+ feat(image): add via.placeholder provider
image was redundant in the subject

- feat(system.networkInterface): add networkInterface faker
+ feat(system): add networkInterface method
networkInterface was redundant in the scope and made the whole commit message long
also method in the subject explains a bit better what it is

- chore(bug-report-template): new design
+ infra: rework bug-report template
the type infra tells that no actual code-changes were made
the subject contains what the PR does

- chore: rename Gender to Sex
+ refactor(name): rename Gender to Sex
this was not a chore as it touched runtime code that affected the end-user
scope name can be used here to tell that the change affects only the name module
```
2 changes: 0 additions & 2 deletions docs/.vitepress/components/api-docs/method.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ function seeAlsoToUrl(see: string): string {

<template>
<div>
<h2 :id="props.method.name">{{ props.method.title }}</h2>

<div v-if="props.method.deprecated" class="warning custom-block">
<p class="custom-block-title">Deprecated</p>
<p>This method is deprecated and will be removed in a future version.</p>
Expand Down
Loading

0 comments on commit 67d11d8

Please sign in to comment.