diff --git a/.github/workflows/pull-request-validation.yml b/.github/workflows/pull-request-validation.yml
index f28b6ecd8b..1971e4aee2 100644
--- a/.github/workflows/pull-request-validation.yml
+++ b/.github/workflows/pull-request-validation.yml
@@ -82,6 +82,23 @@ jobs:
path: docker.zip
retention-days: 1
+ build-browser:
+ name: Build test harness
+ runs-on: windows-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Use Node.js ${{ env.node-version }}
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.node-version }}
+ cache: npm
+
+ - run: npm clean-install --ignore-scripts --strict-peer-deps
+
+ - run: npm run build-browser
+
build-samples:
name: Build samples
runs-on: ubuntu-latest
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d6701dd0e..b0bacf65d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ Legends:
- ๐ are known issues
- ๐งช are experimental changes
- ๐ซ are samples
+- ๐ท๐ป are development environment changes
## [Unreleased]
@@ -147,6 +148,7 @@ Breaking changes in this release:
- Debug into element: open F12, select the subject in Element pane, type `$0.webChat.debugger`
- Breakpoint: open F12, select the subject in Element pane, type `$0.webChat.breakpoint.incomingActivity`
- The `botframework-webchat` package now uses CSS modules for styling purposes, in PR [#5666](https://github.com/microsoft/BotFramework-WebChat/pull/5666), by [@OEvgeny](https://github.com/OEvgeny)
+- ๐ท๐ป Added `npm run build-browser` script for building test harness package only, in PR [#5667](https://github.com/microsoft/BotFramework-WebChat/pull/5667), by [@compulim](https://github.com/compulim)
### Changed
diff --git a/package.json b/package.json
index 5595bd19e4..c454508bc5 100644
--- a/package.json
+++ b/package.json
@@ -61,6 +61,7 @@
"build": "npm run build:production && npm run build:html2-samples",
"build:html2-samples": "cd __tests__/html2/samples/ && esbuild --bundle --format=esm --outbase=. --outdir=./dist/ --minify **/*.tsx --splitting",
"build:production": "npm run build --if-present --workspaces",
+ "build-browser": "npm run build:run --workspace ./packages/test/harness",
"bump": "npm run bump:prod && npm run bump:dev && (npm audit fix || exit 0) && npm run bump:packages && npm run bump:samples",
"bump:dev": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // []) as $L | (.devDependencies // {}) | to_entries | map(select(.key as $K | $L | contains([$K]) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install $PACKAGES_TO_BUMP || true",
"bump:prod": "PACKAGES_TO_BUMP=$(cat package.json | jq -r '(.pinDependencies // {}) as $P | (.localPeerDependencies // []) as $L | (.dependencies // {}) | to_entries | map(select(.key as $K | $L | contains([$K]) | not)) | map(.key + \"@\" + ($P[.key] // [\"latest\"])[0]) | join(\" \")') && [ ! -z \"$PACKAGES_TO_BUMP\" ] && npm install --save-exact $PACKAGES_TO_BUMP || true",
diff --git a/packages/test/harness/package.json b/packages/test/harness/package.json
index 05b42cc6a4..5a5bd19238 100644
--- a/packages/test/harness/package.json
+++ b/packages/test/harness/package.json
@@ -16,7 +16,7 @@
"build:pre": "npm run build:pre:local-dependencies && npm run build:pre:watch",
"build:pre:local-dependencies": "../../../scripts/npm/build-local-dependencies.sh",
"build:pre:watch": "../../../scripts/npm/build-watch.sh",
- "build:run": "concurrently --prefix-colors \"auto\" \"npm:build:run:esbuild:esm\" \"npm:build:run:esbuild:iife\" && touch ./package.json",
+ "build:run": "concurrently --prefix-colors \"auto\" \"npm:build:run:esbuild:esm\" \"npm:build:run:esbuild:iife\" && node ../../../scripts/touch.mjs ./package.json",
"build:run:esbuild:base": "esbuild test-harness=./src/browser/index.js --bundle --define:define=undefined --define:process.env.CI=undefined --minify --outdir=dist --sourcemap --target=chrome100",
"build:run:esbuild:esm": "npm run build:run:esbuild:base -- --format=esm --out-extension:.js=.mjs",
"build:run:esbuild:iife": "npm run build:run:esbuild:base -- --format=iife",
diff --git a/scripts/touch.mjs b/scripts/touch.mjs
new file mode 100644
index 0000000000..59a773c154
--- /dev/null
+++ b/scripts/touch.mjs
@@ -0,0 +1,16 @@
+// Windows does not have "touch", and there are no common shell commands on Windows (cmd) and Linux that can do the job.
+
+///
+
+import { closeSync, openSync, utimesSync } from 'fs';
+
+// eslint-disable-next-line no-magic-numbers, no-undef, prefer-destructuring
+const filename = process.argv[2];
+
+// eslint-disable-next-line security/detect-non-literal-fs-filename
+closeSync(openSync(filename, 'a'));
+
+const now = new Date();
+
+// eslint-disable-next-line security/detect-non-literal-fs-filename
+utimesSync(filename, now, now);