Skip to content

Commit

Permalink
chore(deps): update dependency inquirer to v10 (#2864)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Takahiko Kawakami <[email protected]>
  • Loading branch information
renovate[bot] and shabaraba authored Aug 21, 2024
1 parent a333de0 commit 5071d9d
Show file tree
Hide file tree
Showing 22 changed files with 763 additions and 592 deletions.
12 changes: 12 additions & 0 deletions packages/create-plugin/__e2e__/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export type TestPattern = {
stdout?: string;
stderr?: string;
};
validation?: {
stdout?: string;
}
};
};

Expand Down Expand Up @@ -122,6 +125,15 @@ describe("create-plugin", function () {
);
}
}

if (expected.validation !== undefined) {
if (expected.validation.stdout) {
assert.match(
response.stdout.trim(),
new RegExp(expected.validation.stdout),
);
}
}
} catch (e: any) {
assert.fail(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export const pattern: TestPattern = {
],
},
expected: {
failure: { stdout: ">> Plug-in description must be 1-200chars" },
validation: { stdout: "> Plug-in description must be 1-200chars" },
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export const pattern: TestPattern = {
],
},
expected: {
failure: { stdout: ">> Plug-in name must be 1-64chars" },
validation: { stdout: "> Plug-in name must be 1-64chars" },
},
};
2 changes: 1 addition & 1 deletion packages/create-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"homepage": "https://github.com/kintone/js-sdk/tree/main/packages/create-plugin",
"bugs": "https://github.com/kintone/js-sdk/issues",
"dependencies": {
"@inquirer/prompts": "^5.3.7",
"chalk": "^4.1.2",
"glob": "^10.4.5",
"inquirer": "^8.2.6",
"lodash": "^4.17.21",
"meow": "^9.0.0",
"node-rsa": "^1.1.1",
Expand Down
29 changes: 18 additions & 11 deletions packages/create-plugin/src/__tests__/manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ describe("manifest", () => {
describe("buildManifest", () => {
const templateType = "minimum";
it("should include basic settings", () => {
const baseManifest = createBaseManifest();
// @ts-ignore We can fix this using conditional types
const manifest = buildManifest(
{
...createBaseManifest(),
ja: false,
cn: false,
name: baseManifest.name,
description: baseManifest.name,
homepage_url: {},
supportMobile: false,
enablePluginUploader: false,
},
templateType,
);
Expand All @@ -21,26 +24,30 @@ describe("manifest", () => {
assert.strictEqual(manifest.mobile, undefined);
});
it("should include mobile.js if the answers enable mobile", () => {
const baseManifest = createBaseManifest();
// @ts-ignore We can fix this using conditional types
const manifest = buildManifest(
{
...createBaseManifest(),
ja: false,
cn: false,
mobile: true,
name: baseManifest.name,
description: baseManifest.name,
homepage_url: {},
supportMobile: true,
enablePluginUploader: false,
},
templateType,
);
assert(manifest.mobile && Array.isArray(manifest.mobile.js));
});
it("should include config if the answers enable config", () => {
const baseManifest = createBaseManifest();
// @ts-ignore We can fix this using conditional types
const manifest = buildManifest(
{
...createBaseManifest(),
ja: false,
cn: false,
config: true,
name: baseManifest.name,
description: baseManifest.name,
homepage_url: {},
supportMobile: false,
enablePluginUploader: false,
},
templateType,
);
Expand Down
Loading

0 comments on commit 5071d9d

Please sign in to comment.