Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@adobe/ccweb-add-on-scripts",
"comment": "Bug fixes and improvements",
"type": "patch"
}
],
"packageName": "@adobe/ccweb-add-on-scripts"
}
7 changes: 6 additions & 1 deletion packages/wxp-scripts/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"extension": ["ts"],
"node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm", "no-warnings"],
"node-option": [
"experimental-specifier-resolution=node",
"loader=ts-node/esm",
"enable-source-maps",
"no-warnings"
],
"spec": ["src/test/**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion packages/wxp-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/ccweb-add-on-scripts",
"version": "2.4.2",
"version": "2.4.3",
"author": "Adobe",
"license": "MIT",
"description": "Scripts for Adobe Creative Cloud Web Add-on.",
Expand Down
3 changes: 2 additions & 1 deletion packages/wxp-scripts/src/test/commands/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { AnalyticsErrorMarkers } from "../../AnalyticsMarkers.js";
import type { CommandExecutor } from "../../app/CommandExecutor.js";
import { Build } from "../../commands/build.js";
import { IContainer, ITypes } from "../../config/index.js";
import { PROGRAM_NAME } from "../../constants.js";
import { BuildCommandOptions } from "../../models/BuildCommandOptions.js";

chai.use(chaiAsPromised);
Expand Down Expand Up @@ -76,7 +77,7 @@ describe("build", () => {
it("should execute succesfully when no parameters are passed.", async () => {
analyticsConsent.get.resolves(true);

const build = new Build([], new Config({ root: "." }));
const build = new Build([], new Config({ name: PROGRAM_NAME, root: "." }));

await build.run();

Expand Down
3 changes: 2 additions & 1 deletion packages/wxp-scripts/src/test/commands/clean.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { AnalyticsErrorMarkers } from "../../AnalyticsMarkers.js";
import type { CommandExecutor } from "../../app/CommandExecutor.js";
import { Clean } from "../../commands/clean.js";
import { IContainer, ITypes } from "../../config/index.js";
import { PROGRAM_NAME } from "../../constants.js";

chai.use(chaiAsPromised);

Expand Down Expand Up @@ -74,7 +75,7 @@ describe("clean", () => {
it("should execute succesfully when no parameters are passed.", async () => {
analyticsConsent.get.resolves(true);

const clean = new Clean([], new Config({ root: "." }));
const clean = new Clean([], new Config({ name: PROGRAM_NAME, root: "." }));

await clean.run();

Expand Down
2 changes: 1 addition & 1 deletion packages/wxp-scripts/src/test/commands/commands.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe("ccweb-add-on-scripts", () => {

describe("clean", () => {
test.stdout()
.command(["clean"])
.command(["clean", "--analytics", "off"])
.it("should execute succesfully when no parameters are passed.", async () => {
assert.equal(commandExecutor.execute.callCount, 1);
});
Expand Down
7 changes: 4 additions & 3 deletions packages/wxp-scripts/src/test/commands/package.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import type { CommandExecutor } from "../../app/CommandExecutor.js";
import { Package } from "../../commands/package.js";
import { IContainer, ITypes } from "../../config/index.js";
import { PackageCommandOptions } from "../../models/PackageCommandOptions.js";
import { PROGRAM_NAME } from "../../constants.js";

chai.use(chaiAsPromised);

Expand Down Expand Up @@ -76,7 +77,7 @@ describe("package", () => {
it("should execute succesfully when no parameters are passed.", async () => {
analyticsConsent.get.resolves(true);

const packageCommand = new Package([], new Config({ root: "." }));
const packageCommand = new Package([], new Config({ name: PROGRAM_NAME, root: "." }));

await packageCommand.run();

Expand All @@ -92,7 +93,7 @@ describe("package", () => {

const packageCommand = new Package(
["--src", DEFAULT_SRC_DIRECTORY, "--use", "tsc", "--no-rebuild", "--analytics", "off", "--verbose"],
new Config({ root: "." })
new Config({ name: PROGRAM_NAME, root: "." })
);

await packageCommand.run();
Expand All @@ -106,7 +107,7 @@ describe("package", () => {

describe("catch", () => {
it("should fail when incorrect params are passed", async () => {
const setup = new Package(["--incorrect-flag"], new Config({ root: "." }));
const setup = new Package(["--incorrect-flag"], new Config({ name: PROGRAM_NAME, root: "." }));

const error = new Error("Nonexistent flag: --incorrect-flag\nSee more help with --help");

Expand Down
7 changes: 4 additions & 3 deletions packages/wxp-scripts/src/test/commands/start.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { AnalyticsErrorMarkers } from "../../AnalyticsMarkers.js";
import type { CommandExecutor } from "../../app/CommandExecutor.js";
import { Start } from "../../commands/start.js";
import { IContainer, ITypes } from "../../config/index.js";
import { PROGRAM_NAME } from "../../constants.js";
import { StartCommandOptions } from "../../models/StartCommandOptions.js";
import type { CommandValidator } from "../../validators/CommandValidator.js";

Expand Down Expand Up @@ -91,7 +92,7 @@ describe("start", () => {
it("should execute succesfully when no parameters are passed.", async () => {
analyticsConsent.get.resolves(true);

const start = new Start([], new Config({ root: "." }));
const start = new Start([], new Config({ name: PROGRAM_NAME, root: "." }));

await start.run();

Expand All @@ -111,7 +112,7 @@ describe("start", () => {
it("should execute succesfully when parameters are passed.", async () => {
const start = new Start(
["--src", DEFAULT_SRC_DIRECTORY, "--use", "tsc", "--port", "8000", "--analytics", "off", "--verbose"],
new Config({ root: "." })
new Config({ name: PROGRAM_NAME, root: "." })
);

await start.run();
Expand All @@ -125,7 +126,7 @@ describe("start", () => {

describe("catch", () => {
it("should fail when incorrect params are passed", async () => {
const setup = new Start(["--incorrect-flag"], new Config({ root: "." }));
const setup = new Start(["--incorrect-flag"], new Config({ name: PROGRAM_NAME, root: "." }));

const error = new Error("Nonexistent flag: --incorrect-flag\nSee more help with --help");

Expand Down
4 changes: 2 additions & 2 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"packageName": "@adobe/ccweb-add-on-scripts",
"projectFolder": "packages/wxp-scripts",
"reviewCategory": "production",
"shouldPublish": false
"shouldPublish": true
},
{
"packageName": "@adobe/ccweb-add-on-ssl",
Expand All @@ -61,7 +61,7 @@
"packageName": "@adobe/ccweb-add-on-sdk-types",
"projectFolder": "packages/wxp-sdk-types",
"reviewCategory": "production",
"shouldPublish": true
"shouldPublish": false
}
]
}