Skip to content

Split packages/core into packages/core and packages/browser#1411

Open
carterworks wants to merge 68 commits intomainfrom
create-browser-package
Open

Split packages/core into packages/core and packages/browser#1411
carterworks wants to merge 68 commits intomainfrom
create-browser-package

Conversation

@carterworks
Copy link
Collaborator

@carterworks carterworks commented Dec 5, 2025

Warning

This PR is based off of #1414, which itself is based off of #1412, so this should not be merged until they are.

Description

This PR changes the publishing artifact from being the packages/core folder to a new folder called packages/browser. And that folder gets the @adobe/alloy, and then the core folder appropriately gets the name @adobe/alloy-core. The intent is that both of these packages will be published to NPM.

The core package will be buildless, and then all build steps as well as integration and functional tests, anything to do with a browser stays in the browser package.

No functionality or browser specific functionality has been removed from the packages, the core package, but that is kind of the next step, and hopefully that work can be parallelized.

As it stands right now, the CI test and the publishing workflow still need to be completed. But right now this branch is 95% done.

Related Issue

Motivation and Context

Screenshots (if appropriate):

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

@carterworks carterworks self-assigned this Dec 5, 2025
@carterworks carterworks added the ignore-for-release Do not include this PR in release notes label Dec 5, 2025
@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

⚠️ No Changeset found

Latest commit: 02f6385

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@carterworks
Copy link
Collaborator Author

carterworks commented Jan 23, 2026

Current test failures are related to queueTimeMillis and are unrelated, maybe.

So we are ready to merge.

Ready!

@jonsnyder
Copy link
Collaborator

Let's merge this after the release.

@jonsnyder jonsnyder marked this pull request as draft January 27, 2026 18:23
# Conflicts:
#	package.json
#	packages/browser/test/integration/helpers/mocks/emptyEventResponse.json
#	packages/browser/test/integration/helpers/mocks/mediaSessionResponse.json
#	packages/browser/test/integration/helpers/mocks/targetCustomCodeAction.json
#	packages/browser/test/integration/helpers/mocks/targetPrependHtmlAction.json
#	packages/browser/test/integration/specs/Advertising/consent_gate.spec.js
#	packages/core/package.json
#	packages/core/test/unit/specs/components/Advertising/handlers/viewThroughHandler.spec.js
# Conflicts:
#	package.json
#	packages/browser/test/integration/specs/Advertising/clickthrough_duplicate_skwcid.spec.js
@carterworks carterworks marked this pull request as ready for review February 17, 2026 16:23
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import fs from "fs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a little weird that in a file from src we are using Node APIs. If this file would be read by a bundler, it might crash. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually the other way around - rollup polyfils calls to fs, so if it is called by the browser then it will crash.

It is looking more and more likely that I need to abandon the goal of being buildless.

Copy link
Collaborator Author

@carterworks carterworks Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You and I talked in person and discovered that the functionality of componentMetadata.js can be moved into the alloyBuilder, because that is the only place that it is used.

  • do that

await makeSendServiceWorkerTrackingData(
{
/* eslint-disable-next-line no-underscore-dangle */
xdm: data._xdm.mixins,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will data always have an _xdm key?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a copy-paste from your serviceWorker.js file, so it will depend on what gets attached to notificationclose service worker events, as it did before.

See:

async onNotificationClose(event) {

* @param {NotificationEvent} event
*/
onNotificationClick(event) {
serviceWorkerNotificationClickListener({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onPush returns a listener while onNotificationClick returns undefined. Should we return here too?

@dompuiu
Copy link
Member

dompuiu commented Feb 24, 2026

There is something wrong with the linting. Running pnpm run lint doesn't show any errors. But if you open the file packages/browser/scripts/helpers/entryPointGeneratorBabelPlugin.js, you should see prettier errors (I tested in nvim and vscode).

"build:clean": "rimraf dist distTest",
"build:types": "tsc -p jsconfig.json --declaration --emitDeclarationOnly --outDir dist/types --checkJs false --noEmit false",
"build": "pnpm run build:clean && rollup -c --environment BASE_CODE_MIN,STANDALONE,STANDALONE_MIN,SERVICE_WORKER,SERVICE_WORKER_MIN,BUNDLESIZE && pnpm run build:types",
"build:watch": "rollup -c --watch",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build:watch doesn't work

@dompuiu
Copy link
Member

dompuiu commented Feb 24, 2026

How do you run the dev command now that was removed from the root package.json?

@dompuiu
Copy link
Member

dompuiu commented Feb 24, 2026

In rollup.config.js there are some typos: brotili instead of brotli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release Do not include this PR in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants