Skip to content

Commit ce19ceb

Browse files
authored
chore(deps): use @faker-js/faker (lowlighter#797) [skip ci]
1 parent 877a76b commit ce19ceb

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

.github/readme/partials/documentation/setup/local.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ https://localhost:{port}/username?base=0&newplugin=1&newplugin.option1=hello&new
4141

4242
Testing is done through [jest](https://github.com/facebook/jest) framework.
4343

44-
To avoid consuming APIs requests and causing additional charges on external services, data are [mocked](/tests/mocks/index.mjs) using [JavaScript Proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) and [Faker.js](https://github.com/marak/Faker.js/) with randomly generated data.
44+
To avoid consuming APIs requests and causing additional charges on external services, data are [mocked](/tests/mocks/index.mjs) using [JavaScript Proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) and [Faker.js](https://github.com/faker-js/faker) with randomly generated data.
4545

4646
Since tests are pretty long to run, it is advised to just let GitHub Actions do the testing.
4747

.github/scripts/preview.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fs.copyFile(paths.join(__node_modules, "prismjs/themes/prism-tomorrow.css"), pat
6060
fs.writeFile(paths.join(__preview_js, "app.js"), `${await fs.readFile(paths.join(__web, "app.js"))}`)
6161
fs.writeFile(paths.join(__preview_js, "app.placeholder.js"), `${await fs.readFile(paths.join(__web, "app.placeholder.js"))}`)
6262
fs.copyFile(paths.join(__node_modules, "ejs/ejs.min.js"), paths.join(__preview_js, "ejs.min.js"))
63-
fs.copyFile(paths.join(__node_modules, "faker/dist/faker.min.js"), paths.join(__preview_js, "faker.min.js"))
63+
fs.copyFile(paths.join(__node_modules, "@faker-js/faker/dist/faker.min.js"), paths.join(__preview_js, "faker.min.js"))
6464
fs.copyFile(paths.join(__node_modules, "axios/dist/axios.min.js"), paths.join(__preview_js, "axios.min.js"))
6565
fs.copyFile(paths.join(__node_modules, "axios/dist/axios.min.map"), paths.join(__preview_js, "axios.min.map"))
6666
fs.copyFile(paths.join(__node_modules, "vue/dist/vue.min.js"), paths.join(__preview_js, "vue.min.js"))

ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Below is a list of used packages.
111111
* To format, test and verify SVG validity
112112
* [facebook/jest](https://github.com/facebook/jest) and [nodeca/js-yaml](https://github.com/nodeca/js-yaml)
113113
* For unit testing
114-
* [marak/faker.js](https://github.com/marak/Faker.js)
114+
* [faker-js/faker](https://github.com/faker-js/faker)
115115
* For mocking data
116116
* [steveukx/git-js](https://github.com/steveukx/git-js)
117117
* For simple git operations

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"dependencies": {
3030
"@actions/core": "^1.6.0",
3131
"@actions/github": "^4.0.0",
32+
"@faker-js/faker": "^6.0.0-alpha.3",
3233
"@octokit/graphql": "^4.8.0",
3334
"@octokit/rest": "^18.12.0",
3435
"@primer/css": "^19.2.0",
@@ -40,7 +41,6 @@
4041
"emoji-name-map": "^1.2.9",
4142
"express": "^4.17.1",
4243
"express-rate-limit": "^6.1.0",
43-
"faker": "^5.5.3",
4444
"jimp": "^0.16.1",
4545
"js-yaml": "^4.1.0",
4646
"linguist-js": "^2.2.0",

source/app/web/instance.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default async function({mock, nosettings} = {}) {
121121
app.get("/.js/app.js", limiter, (req, res) => res.sendFile(`${conf.paths.statics}/app.js`))
122122
app.get("/.js/app.placeholder.js", limiter, (req, res) => res.sendFile(`${conf.paths.statics}/app.placeholder.js`))
123123
app.get("/.js/ejs.min.js", limiter, (req, res) => res.sendFile(`${conf.paths.node_modules}/ejs/ejs.min.js`))
124-
app.get("/.js/faker.min.js", limiter, (req, res) => res.sendFile(`${conf.paths.node_modules}/faker/dist/faker.min.js`))
124+
app.get("/.js/faker.min.js", limiter, (req, res) => res.sendFile(`${conf.paths.node_modules}/@faker-js/faker/dist/faker.min.js`))
125125
app.get("/.js/axios.min.js", limiter, (req, res) => res.sendFile(`${conf.paths.node_modules}/axios/dist/axios.min.js`))
126126
app.get("/.js/axios.min.map", limiter, (req, res) => res.sendFile(`${conf.paths.node_modules}/axios/dist/axios.min.map`))
127127
app.get("/.js/vue.min.js", limiter, (req, res) => res.sendFile(`${conf.paths.node_modules}/vue/dist/vue.min.js`))

tests/metrics.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const fs = require("fs")
55
const path = require("path")
66
const url = require("url")
77
const axios = require("axios")
8-
const faker = require("faker")
8+
const faker = require("@faker-js/faker")
99
const ejs = require("ejs")
1010

1111
//Github action

tests/mocks/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//Imports
22
import fs from "fs/promises"
33
import axios from "axios"
4-
import faker from "faker"
4+
import faker from "@faker-js/faker"
55
import paths from "path"
66
import rss from "rss-parser"
77
import urls from "url"

0 commit comments

Comments
 (0)