Skip to content

Commit

Permalink
Merge pull request #10 from wozjac/dependabot/npm_and_yarn/faker-6.6.6
Browse files Browse the repository at this point in the history
build(deps-dev): bump faker from 5.5.3 to 6.6.6
  • Loading branch information
wozjac authored Jun 20, 2024
2 parents 9c9c64b + c7ba0d7 commit 6d90414
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
coverage
.local-pack
*.tgz
workdir
workdir
.vscode
36 changes: 23 additions & 13 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@babel/core": "^7.14.2",
"@babel/preset-env": "^7.14.2",
"@eslint/js": "^9.5.0",
"@faker-js/faker": "^8.4.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand All @@ -51,7 +52,6 @@
"core-js": "^3.13.0",
"coveralls-next": "^4.2.1",
"eslint": "^9.5.0",
"faker": "^5.5.3",
"globals": "^15.6.0",
"jsdoc": "^4.0.3",
"mocha": "^10.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/ODataMockGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
//! Licensed under the Apache License, Version 2.0 - see https://github.com/SAP/openui5/blob/master/LICENSE.txt.

import faker from "faker";
import { faker } from "@faker-js/faker";
import { parseXML } from "./xmlParser.js";
import { DataGenerator } from "./DataGenerator.js";
import * as metadataExtract from "./metadataExtract.js";
Expand Down Expand Up @@ -432,7 +432,7 @@ export class ODataMockGenerator {
// Mustache template?
try {
if (fakerCall.indexOf("{{") !== -1) {
generatedValue = faker.fake(fakerCall);
generatedValue = faker.helpers.fake(fakerCall);
} else {
const fakerCallParts = fakerCall.split(".");
generatedValue = faker[fakerCallParts[0]][fakerCallParts[1]].call();
Expand Down
2 changes: 1 addition & 1 deletion test/withFaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("ODataMockGenerator - generating with faker", () => {
rules: {
faker: {
Supplier: {
Name: "{{system.semver}} --- {{datatype.number}}",
Name: "{{system.semver}} --- {{number.int}}",
},
},
},
Expand Down

0 comments on commit 6d90414

Please sign in to comment.