Skip to content

Commit

Permalink
Merge branch 'refactor/location/zipCode/fake' into refactor/locale/en…
Browse files Browse the repository at this point in the history
…_CA/location/zipcode
  • Loading branch information
ST-DDT authored Nov 3, 2024
2 parents d57204d + b9930dc commit 9fc5193
Show file tree
Hide file tree
Showing 23 changed files with 1,101 additions and 533 deletions.
7 changes: 6 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
{
"groupName": "eslint",
"matchPackageNames": [
"@eslint-types/**",
"@eslint/**",
"@stylistic/**",
"eslint",
Expand All @@ -59,6 +58,12 @@
{
"groupName": "doc-dependencies",
"matchPackageNames": ["ts-morph", "vitepress"]
},
{
// Disable updates for rimraf until Node 18 support is dropped
"groupName": "disabled",
"matchPackageNames": ["rimraf"],
"enabled": false
}
],
"stopUpdatingLabel": "s: on hold",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:

steps:
- name: Checkout faker
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: faker

- name: Checkout playground
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: faker-js/playground
path: playground
Expand All @@ -33,7 +33,7 @@ jobs:
package_json_file: faker/package.json

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: 'Build & Unit Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Required for docs/versions tests
fetch-depth: 0
Expand All @@ -31,7 +31,7 @@ jobs:
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
run: date

- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Required for docs/versions tests
fetch-depth: 0
Expand All @@ -79,7 +79,7 @@ jobs:
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
Expand All @@ -104,7 +104,7 @@ jobs:
name: 'E2E Doc Test: node-22, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
Expand All @@ -125,15 +125,15 @@ jobs:
name: 'Lint: node-22, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand All @@ -155,15 +155,15 @@ jobs:
name: 'TS-Check: node-22, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand All @@ -185,15 +185,15 @@ jobs:
name: 'Codecov: node-22, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # we need the tags and the commit history for the gh release create command
ref: ${{ github.event.pull_request.base.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/preflight-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
name: 'Comment Code Generation'
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: 'next'

- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
Expand All @@ -33,7 +33,7 @@ jobs:
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # we want to push the release branch later
token: ${{ secrets.GH_TOKEN }}
Expand All @@ -24,7 +24,7 @@ jobs:
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Set node version to 22
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
cache: 'pnpm'
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

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

## [9.2.0](https://github.com/faker-js/faker/compare/v9.1.0...v9.2.0) (2024-11-03)


### Features

* **animal:** add petName method ([#3196](https://github.com/faker-js/faker/issues/3196)) ([c02beea](https://github.com/faker-js/faker/commit/c02beeadd49e48656a0307451517e9751e3118c3))
* **number:** add romanNumeral method ([#3070](https://github.com/faker-js/faker/issues/3070)) ([72937de](https://github.com/faker-js/faker/commit/72937de55c892c011846bc2b67dc0df61fbdf5a2))


### Changed Locales

* **locale:** improve Spanish color names ([#3230](https://github.com/faker-js/faker/issues/3230)) ([99d81be](https://github.com/faker-js/faker/commit/99d81bed28b36ab525340e32a7349799cbe88eca))

## [9.1.0](https://github.com/faker-js/faker/compare/v9.0.3...v9.1.0) (2024-10-26)


Expand Down
56 changes: 11 additions & 45 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,53 +109,19 @@ const config: UserConfig<DefaultTheme.Config> = {
head: [
['link', { rel: 'icon', href: '/logo.svg' }],
['meta', { name: 'theme-color', content: '#40af7c' }],
[
'meta',
{
name: 'og:description',
content: description,
},
],
[
'meta',
{
name: 'twitter:description',
content: description,
},
],
[
'meta',
{
name: 'og:image',
content: image,
},
],
[
'meta',
{
name: 'twitter:image',
content: image,
},
],
[
'meta',
{
name: 'twitter:card',
content: 'summary_large_image',
},
],
[
'link',
{
rel: 'me',
href: 'https://fosstodon.org/@faker_js',
},
],
['meta', { name: 'og:title', content: 'FakerJS' }],
['meta', { name: 'og:description', content: description }],
['meta', { name: 'og:image', content: image }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:title', content: 'FakerJS' }],
['meta', { name: 'twitter:description', content: description }],
['meta', { name: 'twitter:site', content: '@faker_js' }],
['meta', { name: 'twitter:image', content: image }],
['meta', { name: 'twitter:image:alt', content: 'The FakerJS logo' }],
['link', { rel: 'me', href: 'https://fosstodon.org/@faker_js' }],
[
'script',
{
id: 'browser-console-faker',
},
{ id: 'browser-console-faker' },
`
const logStyle = 'background: rgba(16, 183, 127, 0.14); color: rgba(255, 255, 245, 0.86); padding: 0.5rem; display: inline-block;';
console.log(\`%cIf you would like to test Faker in the browser console, you can do so using 'await enableFaker()'.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const randomEmail = faker.internet.email(); // [email protected]
```

::: info Note
It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://esm.sh/@faker-js/faker@v9.1.0"`.
It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://esm.sh/@faker-js/faker@v9.2.0"`.
:::

### Alternative CDN links
Expand Down
7 changes: 5 additions & 2 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
],
'@typescript-eslint/switch-exhaustiveness-check': [
'error',
{ requireDefaultForNonUnion: true },
{
considerDefaultExhaustiveForUnions: true, // we consider default cases for unions valid
requireDefaultForNonUnion: true,
},
],
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation
Expand Down Expand Up @@ -144,6 +147,7 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
'unicorn/import-style': 'off', // subjective & doesn't do anything for us
'unicorn/no-array-callback-reference': 'off', // reduces readability
'unicorn/no-nested-ternary': 'off', // incompatible with prettier
'unicorn/no-object-as-default-parameter': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2199
'unicorn/no-null': 'off', // incompatible with TypeScript
'unicorn/no-zero-fractions': 'off', // deactivated to raise awareness of floating operations
'unicorn/number-literal-case': 'off', // incompatible with prettier
Expand All @@ -154,7 +158,6 @@ const config: ReturnType<typeof tseslint.config> = tseslint.config(
// TODO @Shinigami92 2023-09-23: The following rules currently conflict with our code.
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
'unicorn/consistent-function-scoping': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/prefer-export-from': 'off',
'unicorn/prefer-string-slice': 'off',
'unicorn/prevent-abbreviations': 'off',
Expand Down
Loading

0 comments on commit 9fc5193

Please sign in to comment.