Added reactor-extension-alloy as a package within alloy#1448
Added reactor-extension-alloy as a package within alloy#1448Spencer-Smith merged 1996 commits intomainfrom
Conversation
…e fields (#481) * Add new validation and UI for link callbacks, add clear button to code fields * Fix useEffect return value, Fix init, Change error style for code preview, Only show clear button when it was set
* Added ability to set thirdPartyCookiesEnabled from a data element * Remove console and reuse boolean or data element validation
* Update dependencies * Update non-eslint dev deps * Remove/migrate deprecated .eslintignore file * Run prettier * npm audit fix
* Install @playwright/test as an explicit dependency * Inline fixture.jsx to avoid file:// CORS issues * Use raw element objects instead of React.createElement to avoid serialization issues * Replace npm-run-all with concurrently * Use a dev server to serve the dist/ dir during tests
Co-authored-by: Jon Snyder <josnyder@adobe.com>
… "enabled" via data element. (#492)
… error (#491) * Ensure the library is built before starting dev sandbox * Permit empty string as a valid-to-be-ignored idSyncContainerId override value * Add unit test
* Kill build when one fails * Use the components exported from the package * Read componentCreators.js from the @adobe/alloy/src/core directory
Co-authored-by: Nina Ciocanu <nciocanu@adobe.com>
Resolved conflicts between extension integration work and the main branch changes including the packages/core+browser split, monorepo script cleanup, and new BrandConcierge features (voice support, collectSources, sticky sessions). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Squashed commits include: - Collect sources configuration - Match data elements by name - Update reactor schemas to newest version - Various beta releases Keeps workspace:* reference for @adobe/alloy instead of pinned version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ea4b9ea2 Bump happy-dom from 20.0.10 to 20.8.9 (#610) 105c1524 Bump rollup from 4.53.1 to 4.59.0 (#605) 78cbdb7f Fixed an issue where analytics events are overwritten in sequential Update Variable actions (#609) 04ea8dff [skip ci] 2.34.2 d053882d [skip ci] 2.34.2-beta.4 1c07d80c Update to @adobe/alloy@2.32.0 (#608) 5bcdbaf3 [skip ci] 2.34.2-beta.3 32fceeaa Updated data element retrieval to key off of name when possible (#582) d7628022 [skip ci] 2.34.2-beta.2 cf8b497f Update to @adobe/alloy@2.32.0-beta.3 (#607) git-subtree-dir: packages/reactor-extension git-subtree-split: ea4b9ea2a9a2464c2f603a5ab8d7a0226595faf3
…ression Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
the PR was too large and the review page of GitHub experienced performance issues, so all my comments are clumped together. Sorry.
Delete unnecessary files in packages/reactor-extension
eslint.config.standalone.mjs.bakCOPYRIGHTLICENSECODE_OF_CONDUCT.md.nvmrc.prettierrc.json.github- merge
pnpm-workspace.yamlwith top-level one? or is nesting okay?
Fix eslint errors in tests
either adjust the eslint.config.js or deal with them. If there are lots of changes, move this to a separate PR
alloy/license-headershould apply to the reactor-extension package.- instead of adding
package/reactor-extensionto theignoresfor rulesets, either narrow thefilesso that it applies to just the SDK or make the reactor-extension compliant. they aren't - 🚨 If you change nothing else, at least fix this 🚨
alloy/testswas changed from applying topackages/**/test/**topackages/reactor-extension/test/**(aka the linting rules only apply toreactor-extensioninstead of everything)
`pnpm lint` output
❯ pnpm lintadobe-alloy-monorepo@0.0.1 lint /Users/cmcbride/homebase/code/github.com/adobe/alloy
eslint --cache --fix ".{js,cjs,mjs,jsx}" "{sandboxes//src,packages//{src,test,scripts},scripts}/**/.{js,cjs,mjs,jsx}"/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/functional/specs/runtime/redirectWithIdentity.spec.mjs
110:6 warning Disabled test - if you want to skip a test temporarily, use .todo() instead vitest/no-disabled-tests/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/functional/specs/runtime/visitorMigration.spec.mjs
88:6 warning Disabled test - if you want to skip a test temporarily, use .todo() instead vitest/no-disabled-tests/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/functional/specs/view/dataElements/xdmObjectSchemaSelection.spec.mjs
14:33 warning '/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/functional/helpers/endpointMocks/sandboxesMocks.mjs' imported multiple times import/no-duplicates
15:31 warning '/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/functional/helpers/endpointMocks/sandboxesMocks.mjs' imported multiple times import/no-duplicates/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/functional/specs/view/runCommonExtensionViewTests.mjs
18:8 warning Disabled test - if you want to skip a test temporarily, use .todo() instead vitest/no-disabled-tests/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/unit/view/components/overrides/utils.spec.js
70:10 warning Test title must be a string, a function or class name vitest/valid-title
115:10 warning Test title must be a string, a function or class name vitest/valid-title
/Users/cmcbride/homebase/code/github.com/adobe/alloy/packages/reactor-extension/test/unit/view/utils/trimValues.spec.js
87:8 warning Test title must be a string, a function or class name vitest/valid-title
Failing tests when run locally
`pnpm test` output
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯FAIL reactor-extension/unit packages/reactor-extension/test/unit/lib/generatedAlloy.spec.js > Generated alloy.js (preinstalled mode)
AssertionError: expected false to be true // Object.is equality
- Expected
- Received
- true
- false
❯ packages/reactor-extension/test/unit/lib/generatedAlloy.spec.js:42:38
40| alloyPath = path.join(distPath, "alloyPreinstalled.js");
41| // eslint-disable-next-line vitest/no-standalone-expect
42| expect(fs.existsSync(alloyPath)).toBe(true);
| ^
43|
44| // Load the generated code once⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/5]⎯
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL reactor-extension/integration (chromium) packages/reactor-extension/test/integration/configuration/advertisingSection.spec.jsx > Config advertising section > updates form values and saves to settings
VitestBrowserElementError: Cannot find element with locator: getByRole('listbox')2 options available.1 option available.... ❯ Object.selectOption packages/reactor-extension/test/integration/helpers/form.js:125:55 123| 124| // Wait for the listbox with options to appear using Vitest's built-in waiting 125| await expect.element(page.getByRole("listbox")).toBeVisible(); | ^ 126| 127| // Now find and click the matching option ❯ packages/reactor-extension/test/integration/configuration/advertisingSection.spec.jsx:151:4
Caused by: Error: Matcher did not succeed in time.
❯ Object.selectOption packages/reactor-extension/test/integration/helpers/form.js:125:7
❯ packages/reactor-extension/test/integration/configuration/advertisingSection.spec.jsx:151:4⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/5]⎯
FAIL reactor-extension/integration (chromium) packages/reactor-extension/test/integration/configuration/configOverrideSection.spec.jsx > Config overrides section > allows you to save data elements
TimeoutError: locator.click: Timeout 5000ms exceeded.
Call log:
- waiting for locator('[data-vitest="true"]').contentFrame().getByRole('option', { name: 'Enabled' })
- locator resolved to
…- attempting click action
2 × waiting for element to be visible, enabled and stable
- element is not stable
- retrying click action
- waiting 20ms
- waiting for element to be visible, enabled and stable
- element is not stable
- retrying click action
- waiting 100ms
- waiting for element to be visible, enabled and stable
- element is visible, enabled and stable
- scrolling into view if needed
- done scrolling
- element is not visible
- retrying click action
- waiting 100ms
- waiting for element to be visible, enabled and stable
- element was detached from the DOM, retrying
❯ Object.selectOption packages/reactor-extension/test/integration/helpers/form.js:136:24
134| if (text.toLowerCase() === optionText.toLowerCase()) {
135| // eslint-disable-next-line no-await-in-loop
136| await option.click();
| ^
137| return;
138| }
❯ packages/reactor-extension/test/integration/configuration/configOverrideSection.spec.jsx:314:4⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/5]⎯
FAIL reactor-extension/integration (chromium) packages/reactor-extension/test/integration/configuration/generalSettingsAndDatastreamSection.spec.jsx > Config general settings and datastream section > sets list form values from settings
VitestBrowserElementError: Cannot find element with locator: getByTestId('productionDatastreamField')... ❯ Object.waitForLoad packages/reactor-extension/test/integration/helpers/form.js:830:45 828| */ 829| waitForLoad: async () => { 830| await expect.poll(() => !isLoading()).toBeTruthy(); | ^ 831| }, 832| ❯ packages/reactor-extension/test/integration/configuration/generalSettingsAndDatastreamSection.spec.jsx:114:26
Caused by: Error: Matcher did not succeed in time.
❯ Object.waitForLoad packages/reactor-extension/test/integration/helpers/form.js:830:7
❯ packages/reactor-extension/test/integration/configuration/generalSettingsAndDatastreamSection.spec.jsx:114:4⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/5]⎯
FAIL integration (chromium) packages/browser/test/integration/specs/Command Logic/queueTimeMillis.spec.js > queueTimeMillis > queueTimeMillis reflects time waiting for consent
TypeError: [alloy] [Consent] An error occurred while executing the setConsent command.
Caused by: Network request failed.
Caused by: Failed to fetch
❯ packages/browser/test/integration/specs/Command%20Logic/queueTimeMillis.spec.js:117:5⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/5]⎯
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Vitest caught 1 unhandled error during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
TypeError: Network request failed.
Caused by: Failed to fetch
This error originated in "packages/browser/test/integration/specs/Advertising/viewthrough_ids.spec.js" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "should send conversion query with advertising IDs in view-through". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Test Files 5 failed | 434 passed (439)
Tests 4 failed | 2619 passed | 11 skipped (2634)
Errors 1 error
Start at 09:32:20
Duration 46.39s (transform 4.35s, setup 24.11s, import 100.88s, tests 295.82s, environment 22.67s)
Changeset publish integration
(maybe you want to do this in a separate PR)
deployExtensionRelease.yml and initializeExtensionRelease.yml both depend on github.com/adobe/project-card-release-automation, which is deprecated since Github got rid of the kanban style "projects" that it used.
Instead, the ssh-ing and building and maybe even uploading should be converted into a script that is run when pnpm publish is run (which is what changesets does when it decides that the version should be bumped). Look at scripts/deploy.sh
You can also delete scrips/version.sh and scripts/updateAlloy.js because that is handled by changesets
Unify PR quality checking tasks
(Personal opinion and nitpick, so accept or ignore with no consequences. Could even be done as a separate PR)
The extension's quality-checks.yml runs build, lint, and format:check in parallel before running unit and integration tests in parallel.
The monorepo's dev.yaml first runs lint then runs all the tests, using vitest's parallelization.
I like the structure of the extension's quality-checks.yml better, so I think that the following should happen:
- Delete
dev.yaml- - Move
packages/reactor-extension/.github/workflows/quality-checks.ymlinto.github/workflows - Modify the
testssteps so that it just rungspnpm testinstead of the test matrix
npm script cleanup
test:extensionshould bevitest run --project=reactor-extension/unit --project=reactor-extension/integrationsince vitest is configured at the root- delete
testandtest:{coverage,unit,integration}*frompackages/reactor-extension/package.json - delete all test infrastructure, files, scripts, and dependencies, except the functional tests (sauce labs, testcafe)
- delete
- delete
format,format:check,add-license(andpackage/reactor-extension/scripts/add-license.mjs)lint,precommit-msg,prepare,prepush-msh`
|
Also it doesn't seem like Sonar is picking up on these changes quite yet. https://aepoperations.cq.corp.adobe.com/code?id=alloy&pullRequest=1448 |
|
@carterworks I've addressed your requested changes other than unifying the changeset publication (I'd prefer to leave it sort it out separately) |
|
Files not deleted:
ESLint issues (🚨 critical flagged item not fixed):
Broken reference: package.json:33 has "version": "./scripts/version.sh" but that script was deleted |
carterworks
left a comment
There was a problem hiding this comment.
You've addressed all the things I brought up previously, but pnpm lint fails as do a few of the tests
linting errors
func-style errors — these are now caught because alloy/strict no longer excludes reactor-extension. Need to convert function declarations to function expressions (or arrow functions) at:
packages/reactor-extension/src/view/actions/updateVariableView.jsx:386
packages/reactor-extension/src/view/components/extensionView.jsx:185
packages/reactor-extension/src/view/dataElements/xdmObjectView.jsx:297
packages/reactor-extension/src/view/utils/trimValues.js:32
packages/reactor-extension/src/view/utils/useReportAsyncError.js:30
I think there are flaky tests in packages/reactor-extension/test/integration/configuration/configOverrideSection.spec.jsx. find them and add a .skip for now.
|
Linting step should maybe be added to Husky, if it's required for merge? It seems like at least once per PR I add a commit saying "fix linting errors" 😓 |
sure, let's add it. here or in a separate pr–your call. |
carterworks
left a comment
There was a problem hiding this comment.
Thoughts on the flakey tests?
|
From offline discussion with Carter: will update Husky and flaky test in separate PRs. Also (from before) will handle integrating release notes automation. For now just want to merge this before another state change in extension repo or here causes another break. I also have done some quick offline testing to confirm that the sandboxes for the root and the extension package are still functioning as intended. I wasn't comprehensive but just wanted to confirm that things were essentially still working, between manual testing and our testing suites I have more confidence this won't introduce any major regressions. |
Description
reactor-extension-alloyintopackages/reactor-extension, preserving version history for files@adobe/alloydependency from within the workspaceTODO:
Related Issue
Jira
Motivation and Context
Screenshots (if appropriate):
N/A
Checklist:
pnpm changeset) or it is not necessary because this PR is not consumer-facing.