Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/adds-support-for-ulid-gener…
Browse files Browse the repository at this point in the history
…ation' into feat/adds-support-for-ulid-generation
  • Loading branch information
brunocleite committed Mar 19, 2024
2 parents 6e7a967 + f41fd27 commit 70a4bf4
Show file tree
Hide file tree
Showing 38 changed files with 3,121 additions and 38,882 deletions.
16 changes: 13 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
A lot of effort has been put into `Faker` to create a useful and handy library.
There are still a lot of things to be done, so all contributions are welcome!
If you want to make `Faker` a better, please read the following contribution guide.
If you want to make `Faker` a better place, please read the following contribution guide.

# Important
## Before you start

It's generally helpful to [create an issue](https://github.com/faker-js/faker/issues/new/choose) first:

- If you are proposing a new feature, this allows other users to "upvote" the issue and discuss solutions to possible problems.
Once an issue has enough upvotes (usually 10+) it will be reviewed for development.
- If you notice a bug, this allows you to provide steps to reproduce, and allows other users to confirm this is actually a bug.
- It's not required to create an issue in all cases.
For example for fixing a typo in documentation, or adding some new data for a locale, you could immediately create a pull request without an issue.

## Important

Please make sure that you run `pnpm run preflight` before making a PR to ensure that everything is working from the start.
This is a shorthand for running the following scripts in order:
Expand Down Expand Up @@ -218,7 +228,7 @@ Not every change needs to be in the migration guide. If it is too long, it becom

- New locales
- Changes to locale data in existing locales
- Bugfixes where it's unlikely anyone was relying on the old behavior (eg broken values in locale files)
- Bugfixes where it's unlikely anyone was relying on the old behavior (e.g. broken values in locale files)
- New methods and parameters
- Straightforward method aliases, e.g. where a method or parameter is renamed but the old name still works identically. (Runtime warnings will already guide the user in this case)
- Changes to locale definition files which only affect usage via `faker.helpers.fake`, e.g. if a definition file is renamed, but the public API for the method stays the same
Expand Down
7 changes: 7 additions & 0 deletions docs/guide/upgrading_v9/2752.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Remove deprecated commerce method

Removed deprecated commerce method

| old | replacement |
| --------------------------------------------- | ------------------------------------------------- |
| `faker.commerce.price(min, max, dec, symbol)` | `faker.commerce.price({ min, max, dec, symbol })` |
16 changes: 16 additions & 0 deletions docs/guide/upgrading_v9/2753.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Remove deprecated location methods

Removed deprecated location methods

| old | replacement |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `faker.location.zipCodeByState` | `faker.location.zipCode({ state })` |
| `faker.location.cityName` | `faker.location.city` |
| `faker.location.streetName` | `faker.location.street` |
| `faker.location.stateAbbr()` | `faker.location.state({ abbreviated: true })` |
| `faker.location.latitude(max, min, precision)` | `faker.location.latitude({ max, min, precision })` |
| `faker.location.longitude(max, min, precision)` | `faker.location.longitude({ max, min, precision })` |
| `faker.location.direction(abbreviated)` | `faker.location.direction({ abbreviated })` |
| `faker.location.cardinalDirection(abbreviated)` | `faker.location.cardinalDirection({ abbreviated })` |
| `faker.location.ordinalDirection(abbreviated)` | `faker.location.ordinalDirection({ abbreviated })` |
| `faker.location.nearbyGPSCoordinate(coordinate, radius, isMetric)` | `faker.location.nearbyGPSCoordinate({ origin, radius, isMetric })` |
31 changes: 31 additions & 0 deletions docs/guide/upgrading_v9/2754.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### Remove deprecated type aliases

Removed deprecated type aliases

| old | replacement |
| -------------------------------- | ------------------------------- |
| `AddressDefinitions` | `LocationDefinition` |
| `AirlineDefinitions` | `AirlineDefinition` |
| `AnimalDefinitions` | `AnimalDefinition` |
| `ColorDefinitions` | `ColorDefinition` |
| `CommerceDefinitions` | `CommerceDefinition` |
| `CommerceProductNameDefinitions` | `CommerceProductNameDefinition` |
| `CompanyDefinitions` | `CompanyDefinition` |
| `DatabaseDefinitions` | `DatabaseDefinition` |
| `DateDefinitions` | `DateDefinition` |
| `FinanceDefinitions` | `FinanceDefinition` |
| `HackerDefinitions` | `HackerDefinition` |
| `InternetDefinitions` | `InternetDefinition` |
| `LoremDefinitions` | `LoremDefinition` |
| `MusicDefinitions` | `MusicDefinition` |
| `NameDefinitions` | `PersonDefinition` |
| `PhoneNumberDefinitions` | `PhoneNumberDefinition` |
| `ScienceDefinitions` | `ScienceDefinition` |
| `SystemDefinitions` | `SystemDefinition` |
| `SystemMimeTypeEntryDefinitions` | `SystemMimeTypeEntryDefinition` |
| `VehicleDefinitions` | `VehicleDefinition` |
| `WordDefinitions` | `WordDefinition` |
| `CSSFunction` | `CssFunctionType` |
| `CSSSpace` | `CssSpaceType` |
| `AddressModule` | `LocationModule` |
| `NameModule` | `PersonModule` |
9 changes: 9 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
[build]
publish = "docs/.vitepress/dist"
command = "pnpm docs:build:ci"
ignore = '''
if [ "$CONTEXT" != "deploy-preview" ]; then
# Always build when not a PR preview
exit 1;
else
# Otherwise check if something doc related changed.
git diff --quiet origin/next...$COMMIT_REF -- . \':!src/locale/\' \':!src/locales/\' \':!test/\' \':!package.json\' \':!pnpm-lock.yaml\' \':!.github/\'
fi
'''

# Alias for the main page
[[redirects]]
Expand Down
23 changes: 15 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/types/index.d.ts",
"types": "index.d.ts",
"typesVersions": {
">=5.0": {
"*": [
"dist/types/*"
]
}
},
"exports": {
".": {
"types": "./dist/types/index.d.ts",
Expand Down Expand Up @@ -91,17 +98,17 @@
"@eslint-types/typescript-eslint": "7.0.2",
"@eslint-types/unicorn": "51.0.1",
"@types/markdown-it": "13.0.7",
"@types/node": "20.11.25",
"@types/node": "20.11.28",
"@types/sanitize-html": "2.11.0",
"@types/semver": "7.5.8",
"@types/validator": "13.11.9",
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"@vitest/coverage-v8": "1.3.1",
"@vitest/ui": "1.3.1",
"@vitest/coverage-v8": "1.4.0",
"@vitest/ui": "1.4.0",
"@vueuse/core": "10.9.0",
"conventional-changelog-cli": "4.1.0",
"cypress": "13.6.6",
"cypress": "13.7.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-define-config": "2.1.0",
Expand All @@ -124,12 +131,12 @@
"typedoc": "0.25.12",
"typescript": "5.4.2",
"validator": "13.11.0",
"vite": "5.1.5",
"vite": "5.1.6",
"vitepress": "1.0.0-rc.45",
"vitest": "1.3.1",
"vitest": "1.4.0",
"vue": "3.4.21"
},
"packageManager": "pnpm@8.15.4",
"packageManager": "pnpm@8.15.5",
"engines": {
"node": ">=18.0.0",
"npm": ">=9.0.0"
Expand Down
Loading

0 comments on commit 70a4bf4

Please sign in to comment.