diff --git a/common/changes/@adobe/ccweb-add-on-scripts/release-20250224-01_2025-02-24-16-39.json b/common/changes/@adobe/ccweb-add-on-scripts/release-20250224-01_2025-02-24-16-39.json new file mode 100644 index 0000000..2051be2 --- /dev/null +++ b/common/changes/@adobe/ccweb-add-on-scripts/release-20250224-01_2025-02-24-16-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@adobe/ccweb-add-on-scripts", + "comment": "Bug fixes and improvements", + "type": "patch" + } + ], + "packageName": "@adobe/ccweb-add-on-scripts" +} \ No newline at end of file diff --git a/packages/wxp-scripts/.mocharc.json b/packages/wxp-scripts/.mocharc.json index b85c06f..118fcce 100644 --- a/packages/wxp-scripts/.mocharc.json +++ b/packages/wxp-scripts/.mocharc.json @@ -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"] } diff --git a/packages/wxp-scripts/package.json b/packages/wxp-scripts/package.json index 9ff57ab..30a798d 100644 --- a/packages/wxp-scripts/package.json +++ b/packages/wxp-scripts/package.json @@ -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.", diff --git a/packages/wxp-scripts/src/test/commands/build.spec.ts b/packages/wxp-scripts/src/test/commands/build.spec.ts index b28cb39..863c6f5 100644 --- a/packages/wxp-scripts/src/test/commands/build.spec.ts +++ b/packages/wxp-scripts/src/test/commands/build.spec.ts @@ -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); @@ -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(); diff --git a/packages/wxp-scripts/src/test/commands/clean.spec.ts b/packages/wxp-scripts/src/test/commands/clean.spec.ts index 686dd90..c0e3d47 100644 --- a/packages/wxp-scripts/src/test/commands/clean.spec.ts +++ b/packages/wxp-scripts/src/test/commands/clean.spec.ts @@ -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); @@ -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(); diff --git a/packages/wxp-scripts/src/test/commands/commands.spec.ts b/packages/wxp-scripts/src/test/commands/commands.spec.ts index 35c88ea..134de48 100644 --- a/packages/wxp-scripts/src/test/commands/commands.spec.ts +++ b/packages/wxp-scripts/src/test/commands/commands.spec.ts @@ -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); }); diff --git a/packages/wxp-scripts/src/test/commands/package.spec.ts b/packages/wxp-scripts/src/test/commands/package.spec.ts index fcb7bbe..6cb3af6 100644 --- a/packages/wxp-scripts/src/test/commands/package.spec.ts +++ b/packages/wxp-scripts/src/test/commands/package.spec.ts @@ -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); @@ -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(); @@ -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(); @@ -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"); diff --git a/packages/wxp-scripts/src/test/commands/start.spec.ts b/packages/wxp-scripts/src/test/commands/start.spec.ts index b939157..04dba6d 100644 --- a/packages/wxp-scripts/src/test/commands/start.spec.ts +++ b/packages/wxp-scripts/src/test/commands/start.spec.ts @@ -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"; @@ -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(); @@ -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(); @@ -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"); diff --git a/rush.json b/rush.json index ca5ec7e..f9924dc 100644 --- a/rush.json +++ b/rush.json @@ -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", @@ -61,7 +61,7 @@ "packageName": "@adobe/ccweb-add-on-sdk-types", "projectFolder": "packages/wxp-sdk-types", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false } ] }