Skip to content

Commit

Permalink
Merge branch 'next' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Sep 10, 2024
2 parents 3984d21 + 18ab2c7 commit 18b4257
Show file tree
Hide file tree
Showing 12 changed files with 477 additions and 260 deletions.
8 changes: 7 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @type {import('prettier').Config}
*/
export default {
plugins: ['prettier-plugin-organize-imports'],
plugins: ['prettier-plugin-organize-imports', 'prettier-plugin-packagejson'],
singleQuote: true,
trailingComma: 'es5',
overrides: [
Expand All @@ -24,5 +24,11 @@ export default {
organizeImportsSkipDestructiveCodeActions: true,
},
},
{
files: 'package.json',
options: {
packageSortOrder: ['name', 'version', 'description', 'scripts'],
},
},
],
};
20 changes: 2 additions & 18 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,11 @@
[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]]
from = "https://v9.fakerjs.dev"
to = "https://fakerjs.dev"
status = 302
force = true

# Alias for the next page
[[redirects]]
from = "https://v10.fakerjs.dev"
to = "https://next.fakerjs.dev"
from = "https://v10.fakerjs.dev/*"
to = "https://next.fakerjs.dev/:splat"
status = 302
force = true

Expand Down
90 changes: 47 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,36 @@
"name": "@faker-js/faker",
"version": "9.0.0",
"description": "Generate massive amounts of fake contextual data",
"sideEffects": false,
"scripts": {
"clean": "rimraf coverage .eslintcache dist docs/.vitepress/cache docs/.vitepress/dist node_modules",
"build:clean": "rimraf dist",
"build:code": "tsup-node",
"build:types": "tsc --project tsconfig.build.json",
"build": "run-s build:clean build:code build:types",
"generate": "run-s generate:locales generate:api-docs",
"generate:api-docs": "tsx ./scripts/apidocs.ts",
"generate:locales": "tsx ./scripts/generate-locales.ts",
"docs:build": "run-s generate:api-docs docs:build:run",
"docs:build:run": "vitepress build docs",
"docs:build:ci": "run-s build docs:build",
"docs:dev": "run-s generate:api-docs docs:dev:run",
"docs:dev:run": "vitepress dev docs",
"docs:serve": "vitepress serve docs --port 5173",
"docs:diff": "tsx ./scripts/diff.ts",
"format": "prettier --cache --write .",
"lint": "eslint --cache --cache-strategy content .",
"ts-check": "tsc",
"test": "vitest",
"test:update-snapshots": "vitest run -u",
"coverage": "vitest run --coverage",
"cypress": "cypress",
"docs:test:e2e:ci": "run-s docs:build:ci docs:test:e2e:run",
"docs:test:e2e:run": "run-p --race docs:serve \"cypress run\"",
"docs:test:e2e:open": "run-p --race docs:serve \"cypress open\"",
"release": "commit-and-tag-version",
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
"preflight": "pnpm install && run-s generate format lint build test:update-snapshots ts-check"
},
"keywords": [
"faker",
"faker.js",
Expand All @@ -17,29 +46,23 @@
"fake contextual data generator",
"fake contextual data"
],
"homepage": "https://fakerjs.dev",
"bugs": {
"url": "https://github.com/faker-js/faker/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/faker-js/faker.git"
"url": "git+https://github.com/faker-js/faker.git"
},
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/fakerjs"
}
],
"bugs": "https://github.com/faker-js/faker/issues",
"license": "MIT",
"sideEffects": false,
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "index.d.ts",
"typesVersions": {
">=5.0": {
"*": [
"dist/types/*"
]
}
},
"exports": {
".": {
"types": "./dist/types/index.d.ts",
Expand All @@ -55,40 +78,20 @@
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "index.d.ts",
"typesVersions": {
">=5.0": {
"*": [
"dist/types/*"
]
}
},
"files": [
"CHANGELOG.md",
"dist"
],
"scripts": {
"clean": "rimraf coverage .eslintcache dist docs/.vitepress/cache docs/.vitepress/dist node_modules",
"build:clean": "rimraf dist",
"build:code": "tsup-node",
"build:types": "tsc --project tsconfig.build.json",
"build": "run-s build:clean build:code build:types",
"generate": "run-s generate:locales generate:api-docs",
"generate:api-docs": "tsx ./scripts/apidocs.ts",
"generate:locales": "tsx ./scripts/generate-locales.ts",
"docs:build": "run-s generate:api-docs docs:build:run",
"docs:build:run": "vitepress build docs",
"docs:build:ci": "run-s build docs:build",
"docs:dev": "run-s generate:api-docs docs:dev:run",
"docs:dev:run": "vitepress dev docs",
"docs:serve": "vitepress serve docs --port 5173",
"docs:diff": "tsx ./scripts/diff.ts",
"format": "prettier --cache --write .",
"lint": "eslint --cache --cache-strategy content .",
"ts-check": "tsc",
"test": "vitest",
"test:update-snapshots": "vitest run -u",
"coverage": "vitest run --coverage",
"cypress": "cypress",
"docs:test:e2e:ci": "run-s docs:build:ci docs:test:e2e:run",
"docs:test:e2e:run": "run-p --race docs:serve \"cypress run\"",
"docs:test:e2e:open": "run-p --race docs:serve \"cypress open\"",
"release": "commit-and-tag-version",
"prepublishOnly": "pnpm run clean && pnpm install && pnpm run build",
"preflight": "pnpm install && run-s generate format lint build test:update-snapshots ts-check"
},
"devDependencies": {
"@actions/github": "6.0.0",
"@algolia/client-search": "5.2.3",
Expand Down Expand Up @@ -119,6 +122,7 @@
"npm-run-all2": "6.2.2",
"prettier": "3.3.3",
"prettier-plugin-organize-imports": "4.0.0",
"prettier-plugin-packagejson": "2.5.2",
"rimraf": "5.0.10",
"sanitize-html": "2.13.0",
"semver": "7.6.3",
Expand Down
Loading

0 comments on commit 18b4257

Please sign in to comment.