Skip to content

Commit 1987757

Browse files
authored
Merge pull request #9 from lokesh-coder/develop
Fix dep vulnerabilities
2 parents 79f67db + 59b8465 commit 1987757

File tree

15 files changed

+60
-19
lines changed

15 files changed

+60
-19
lines changed

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"babel-preset-gatsby": "^0.4.1",
1212
"clsx": "^1.1.1",
1313
"flexboxgrid": "^6.3.1",
14-
"gatsby": "2.22.12",
14+
"gatsby": "^2.24.47",
1515
"gatsby-image": "^2.4.1",
1616
"gatsby-plugin-breadcrumb": "^9.0.2",
1717
"gatsby-plugin-manifest": "^2.4.2",
@@ -29,7 +29,7 @@
2929
"gatsby-source-github-api": "^0.2.1",
3030
"gatsby-transformer-remark": "^2.8.6",
3131
"gatsby-transformer-sharp": "^2.5.1",
32-
"lodash-es": "^4.17.15",
32+
"lodash": "^4.17.20",
3333
"node-sass": "^4.14.1",
3434
"prismjs": "^1.20.0",
3535
"prop-types": "^15.7.2",

docs/src/components/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import { Link } from "gatsby";
3-
import { groupBy } from "lodash-es";
3+
import groupBy from "lodash/groupBy";
44
import Brand from "./visuals/brand";
55

66
const MenuLinks = ({ allContent }) => {

packages/cli/__tests__/main.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { LesyTestBed } from "@lesy/testbed";
22
import { resolve } from "path";
3+
// tslint:disable-next-line: import-name
4+
import * as PluginData from "../src";
35

46
describe("CLI", () => {
57
let testBed;
@@ -8,8 +10,8 @@ describe("CLI", () => {
810
isTypescriptApp: true,
911
loadDefaultPlugins: false,
1012
root: resolve(__dirname, "../"),
11-
commands: [resolve(__dirname, "../src/commands/default.command.ts")],
1213
features: [(f: any) => (f.pkg = { version: "1.0.0" })],
14+
...PluginData,
1315
});
1416
});
1517
it("should print greeting message", async () => {

packages/cli/src/templates/js-basic/{{name}}/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
"keywords": [
2020
"lesy"
2121
],
22-
"author": {},
22+
"author": "",
2323
"license": "MIT"
2424
}

packages/cli/src/templates/ts-basic/{{name}}/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"main": "dist/index.js",
66
"scripts": {
77
"clean": "rm -rf ./dist",
8-
"copy-templates": "copyfiles -f ./src/templates/**/* ./dist/templates",
9-
"build": "npm run clean && tsc --build tsconfig.json && npm run copy-templates",
8+
"build": "npm run clean && tsc --build tsconfig.json",
109
"test": "jest"
1110
},
1211
"bin": {
@@ -27,6 +26,6 @@
2726
"keywords": [
2827
"lesy"
2928
],
30-
"author": {},
29+
"author": "",
3130
"license": "MIT"
3231
}

packages/misc/pilot-ui/package-lock.json

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

packages/plugins/lesy-plugin-help/__tests__/help.command.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { LesyTestBed } from "@lesy/testbed";
22
import { resolve } from "path";
3+
// tslint:disable-next-line: import-name
4+
import PluginData from "../src";
35

46
describe("@lesy/lesy-plugin-help", () => {
57
let testBed;
@@ -8,8 +10,9 @@ describe("@lesy/lesy-plugin-help", () => {
810
isTypescriptApp: true,
911
loadDefaultPlugins: false,
1012
root: resolve(__dirname, "../"),
13+
1114
commands: [
12-
resolve(__dirname, "../src/help.command.ts"),
15+
...PluginData.commands,
1316
{
1417
name: "hello",
1518
description: "this is hello desc",
@@ -58,7 +61,7 @@ describe("@lesy/lesy-plugin-help", () => {
5861
},
5962
},
6063
],
61-
middlewares: [resolve(__dirname, "../src/help.middleware.ts")],
64+
middlewares: [...PluginData.middlewares],
6265
features: [resolve(__dirname, "./fixtures/help.feature.ts")],
6366
config: {
6467
defaultCmd: "default",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { LesyTestBed } from "@lesy/testbed";
2+
import { resolve } from "path";
3+
// tslint:disable-next-line: import-name
4+
import PluginData from "../src";
5+
6+
(PluginData["features"] as any).push(
7+
(f: any) => (f.pkg = { name: "test_key" }),
8+
);
9+
10+
describe("@lesy/lesy-plugin-pilot", () => {
11+
let testBed;
12+
beforeEach(() => {
13+
testBed = new LesyTestBed({
14+
isTypescriptApp: true,
15+
loadDefaultPlugins: false,
16+
root: resolve(__dirname, "../"),
17+
...PluginData,
18+
});
19+
});
20+
21+
it("should execute the run command", async () => {
22+
const response = await testBed.run([
23+
"run",
24+
"ls packages/plugins/lesy-plugin-pilot/__tests__/fixtures",
25+
]);
26+
expect(response).toContain(
27+
"running > ls packages/plugins/lesy-plugin-pilot/__tests__/fixtures",
28+
);
29+
expect(response).toContain("hello.txt");
30+
});
31+
32+
it("should throw error on executing the run command", async () => {
33+
const response = await testBed.run(["run", "echos abc"]);
34+
expect(response).toContain("Error > Command failed with ENOENT: echos abc");
35+
});
36+
});

packages/plugins/lesy-plugin-pilot/src/run.command.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import execa from "execa";
2-
31
export default {
42
name: "run",
53
description: "Run shell command",
@@ -12,6 +10,7 @@ export default {
1210
visibleInList: false,
1311

1412
async run({ args, utils }) {
13+
const execa = require("execa");
1514
const chalk = utils.color();
1615
console.log(`${chalk.green("running")} > ${chalk.gray(args.command)}`);
1716
const [main, ...others] = args.command.split(" ");

0 commit comments

Comments
 (0)