Skip to content

DINT-1889: update ACDL version#204

Merged
benjaminkalk merged 6 commits into
mainfrom
DINT-1889
Apr 29, 2026
Merged

DINT-1889: update ACDL version#204
benjaminkalk merged 6 commits into
mainfrom
DINT-1889

Conversation

@benjaminkalk
Copy link
Copy Markdown
Contributor

@benjaminkalk benjaminkalk commented Apr 14, 2026

Description

Update ACDL version, and add alias to appropriately map new export

Related Issue

https://jira.corp.adobe.com/browse/DINT-1889

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Comment thread yarn.lock Outdated
integrity sha512-Ah0MoI+RF84G3QCjV8SF0kvPjGCkKhU/tWEe2TpTq/5nuxQy89215A6oOm4WuLv1tIV2kQ4PJooL+0LgcjUb9w==
"@adobe/adobe-client-data-layer@^3.0.1":
version "3.0.1"
resolved "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-adobe-platform-release/@adobe/adobe-client-data-layer/-/adobe-client-data-layer-3.0.1.tgz#1dafc6b5a674028dafd0d21437d06c3f92045538"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This might be the reason its having cert issue...https://artifactory.corp.adobe.com is not accessible outside Adobe network.

Is it possible to get this package from https://registry.npmjs.org or https://artifactory-uw2.adobeitc.com/artifactory/api/npm/?

Copy link
Copy Markdown
Contributor

@grahamcrackers grahamcrackers left a comment

Choose a reason for hiding this comment

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

I've approved but I think it's better if we define some types for adobeDataLayer instead of using any. I asked claude to come up with the types from the package and this is what it spat out. We could stick these somewhere for now:

// Type definitions for @adobe/adobe-client-data-layer
// Project: https://github.com/adobe/adobe-client-data-layer
// Definitions by: Graham Rogers <https://github.com/grahamcrackers>

export interface DataLayerConfig {
  dataLayer?: AdobeDataLayer;
}

export type DataLayerEventType =
  | "adobeDataLayer:change"
  | "adobeDataLayer:event"
  | "adobeDataLayer:reset"
  | string; // custom events

export interface DataLayerEvent {
  type: DataLayerEventType;
  data?: Record<string, unknown>;
  timestamp?: string;
  id?: string;
}

export interface EventListenerOptions {
  path?: string;   // only fire when this path in state changes
  scope?: "past" | "future" | "all"; // default: "future"
}

export type DataLayerEventHandler = (event: DataLayerEvent) => void;

export interface AdobeDataLayer extends Array<Record<string, unknown>> {
  push(...items: Array<Record<string, unknown> | DataLayerEvent>): number;
  getState(): Record<string, unknown>;
  getState(key: string): unknown;
  addEventListener(
    type: DataLayerEventType,
    handler: DataLayerEventHandler,
    options?: EventListenerOptions
  ): void;
  removeEventListener(
    type: DataLayerEventType,
    handler?: DataLayerEventHandler
  ): void;
}

declare global {
  interface Window {
    adobeDataLayer: AdobeDataLayer;
    adobeDataLayerInPage?: AdobeDataLayer;
  }
}

Comment thread .vscode/settings.json
"source.fixAll.eslint": "explicit"
}
},
"js/ts.tsdk.path": "node_modules/typescript/lib"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this really needed? seems like this should be kept to the user settings level

return JSON.parse(JSON.stringify(val));
});

(window as any).magentoStorefrontEvents = mse;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i thought we had some types for magentoStorefrontEvents, but i'd add

// eslint-disable-next-line @typescript-eslint/no-explicit-any

@benjaminkalk benjaminkalk merged commit ff19f84 into main Apr 29, 2026
3 checks passed
@benjaminkalk benjaminkalk deleted the DINT-1889 branch April 29, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants