Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Mar 23, 2022
2 parents d0519e6 + a759c87 commit ff816b9
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 66 deletions.
4 changes: 4 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ coverage:
default:
target: 95%
threshold: 2%
patch:
default:
target: 95%
threshold: 1%
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ const randomEmail = faker.internet.email(); // [email protected]
const randomPhoneNumber = faker.phone.phoneNumber(); // 938-672-1359 x418
```

#### Alternative CDN links

**esm:**

- https://esm.sh/@faker-js/faker
- https://cdn.jsdelivr.net/npm/@faker-js/faker/+esm

**cjs:**

- https://cdn.jsdelivr.net/npm/@faker-js/faker

### TypeScript Support

Since version `v6+` there is native TypeScript support.
Expand Down
35 changes: 23 additions & 12 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ const sidebar = {
],
};

// grab from process.env once this is building on netlify
const algolia = {
apiKey: '',
indexName: '',
searchParameters: {
facetFilters: [''],
},
apiKey: process.env.API_KEY,
appId: process.env.APP_ID,
indexName: 'fakerjs',
};

const description =
Expand All @@ -62,27 +59,42 @@ export default defineConfig({
[
'meta',
{
property: 'og:description',
name: 'og:description',
content: description,
},
],
[
'meta',
{
name: 'twitter:description',
content: description,
},
],
[
'meta',
{
name: 'description',
content: description,
},
],
[
'meta',
{
property: 'og:image',
name: 'og:image',
content: image,
},
],
[
'meta',
{
property: 'twitter:image',
name: 'twitter:image',
content: image,
},
],
[
'meta',
{
property: 'twitter:card',
name: 'twitter:card',
content: 'summary_large_image',
},
],
Expand All @@ -96,7 +108,6 @@ export default defineConfig({
editLinkText: 'Suggest changes to this page',
nav,
sidebar,
// TODO 2022-03-06: https://github.com/faker-js/faker/issues/222
// algolia,
algolia,
},
});
13 changes: 12 additions & 1 deletion docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const randomCard = faker.helpers.createCard(); // An object representing a rando
Using the browser is great for experimenting 👍. However, due to all of the strings Faker uses to generate fake data, **Faker is a large package**. It's `> 5 MiB` minified. **Please avoid deploying Faker in your web app.**
:::

### Deno
### CDN/Deno

```js
import { faker } from 'https://cdn.skypack.dev/@faker-js/faker';
Expand All @@ -85,6 +85,17 @@ const randomCard = faker.helpers.createCard(); // random contact card containing
It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://cdn.skypack.dev/@faker-js/[email protected]"`. Add `?dts` to import with type definitions: `import { faker } from "https://cdn.skypack.dev/@faker-js/[email protected]?dts"`.
:::

#### Alternative CDN links

**esm:**

- https://esm.sh/@faker-js/faker
- https://cdn.jsdelivr.net/npm/@faker-js/faker/+esm

**cjs:**

- https://cdn.jsdelivr.net/npm/@faker-js/faker

## Community

If you have questions or need help, reach out to the community via [Discord](https://chat.fakerjs.dev) and [GitHub Discussions](https://github.com/faker-js/faker/discussions).
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@
"@types/prettier": "~2.4.4",
"@types/sanitize-html": "~2.6.2",
"@types/validator": "~13.7.1",
"@typescript-eslint/eslint-plugin": "~5.15.0",
"@typescript-eslint/parser": "~5.15.0",
"@vitest/ui": "~0.7.6",
"@typescript-eslint/eslint-plugin": "~5.16.0",
"@typescript-eslint/parser": "~5.16.0",
"@vitest/ui": "~0.7.7",
"c8": "~7.11.0",
"conventional-changelog-cli": "~2.2.2",
"cypress": "~9.5.2",
Expand All @@ -123,7 +123,7 @@
"validator": "~13.7.0",
"vite": "~2.8.6",
"vitepress": "~0.22.3",
"vitest": "~0.7.6"
"vitest": "~0.7.7"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
96 changes: 48 additions & 48 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
"outDir": "dist",
"declaration": true,
"esModuleInterop": true,
"allowJs": true
"allowJs": true,
"alwaysStrict": true,
// "strictNullChecks": true,
// "strictBindCallApply": true,
"strictFunctionTypes": true,
// "strictPropertyInitialization": true,
// "noImplicitAny": true,
// "noImplicitThis": true,
"useUnknownInCatchVariables": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit ff816b9

Please sign in to comment.