Skip to content

Commit

Permalink
Upgrade some of the other deps (not all)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Mar 19, 2021
1 parent 509802e commit 56f5bd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
"ava": "^3.15.0",
"husky": "^5.1.3",
"ink-docstrap": "1.3.2",
"js-yaml": "^3.13.1",
"js-yaml": "^4.0.0",
"jsdoc": "3.6.6",
"lint-staged": "^10.5.4",
"markdown-it-emoji": "^1.4.0",
"node-sass": "^4.14.1",
"markdown-it-emoji": "^2.0.0",
"node-sass": "^5.0.0",
"nyc": "^15.1.0",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",
Expand All @@ -96,10 +96,10 @@
"dependencies": {
"@11ty/dependency-tree": "^1.0.0",
"browser-sync": "^2.26.14",
"chalk": "^3.0.0",
"chalk": "^4.1.0",
"chokidar": "^3.5.1",
"debug": "^4.3.1",
"dependency-graph": "^0.9.0",
"dependency-graph": "^0.11.0",
"ejs": "^2.7.4",
"fast-glob": "^3.2.5",
"fs-extra": "^8.1.0",
Expand Down
16 changes: 8 additions & 8 deletions test/UserDataExtensionsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ let yaml = require("js-yaml");

function injectDataExtensions(dataObj) {
dataObj.config.dataExtensions = new Map([
["yaml", s => yaml.safeLoad(s)],
["nosj", JSON.parse]
["yaml", (s) => yaml.load(s)],
["nosj", JSON.parse],
]);
}

test("Local data", async t => {
test("Local data", async (t) => {
let dataObj = new TemplateData("./test/stubs-630/");
injectDataExtensions(dataObj);

Expand Down Expand Up @@ -37,7 +37,7 @@ test("Local data", async t => {
t.is(withLocalData.jsKey1, "js1");
});

test("Local files", async t => {
test("Local files", async (t) => {
let dataObj = new TemplateData("./test/stubs-630/");
injectDataExtensions(dataObj);
let files = await dataObj.getLocalDataPaths(
Expand Down Expand Up @@ -67,17 +67,17 @@ test("Local files", async t => {
"./test/stubs-630/component-yaml/component.11tydata.nosj",
"./test/stubs-630/component-yaml/component.11tydata.json",
"./test/stubs-630/component-yaml/component.11tydata.cjs",
"./test/stubs-630/component-yaml/component.11tydata.js"
"./test/stubs-630/component-yaml/component.11tydata.js",
]);
});

test("Global data", async t => {
test("Global data", async (t) => {
let dataObj = new TemplateData("./test/stubs-630/");

injectDataExtensions(dataObj);

t.deepEqual(await dataObj.getGlobalDataGlob(), [
"./test/stubs-630/_data/**/*.(nosj|yaml|json|cjs|js)"
"./test/stubs-630/_data/**/*.(nosj|yaml|json|cjs|js)",
]);

let data = await dataObj.getData();
Expand All @@ -103,7 +103,7 @@ test("Global data", async t => {
t.is(data.subdir.globalDataSubdir.keyyaml, "yaml");
});

test("Global data merging and priority", async t => {
test("Global data merging and priority", async (t) => {
let dataObj = new TemplateData("./test/stubs-630/");
injectDataExtensions(dataObj);

Expand Down

0 comments on commit 56f5bd4

Please sign in to comment.