Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
STAGED_ONLY=true npm run add-license
npx lint-staged
npm run test:scripts
npm run test:unit
30 changes: 29 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2024 Adobe. All rights reserved.
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Expand All @@ -19,6 +19,8 @@ import react from "eslint-plugin-react";
import { defineConfig, globalIgnores } from "eslint/config";
import { glob } from "glob";
import globals from "globals";
// eslint-disable-next-line import/extensions
import license from "./scripts/eslint/licenseRule.js";

const allComponentPaths = glob.sync("packages/core/src/components/*/");

Expand All @@ -31,7 +33,33 @@ export default defineConfig([
"sandboxes/**/build/",
"sandboxes/**/public/",
"node_modules/",
"launch*.js",
]),
{
name: "alloy/license-header",
files: ["**/*.{cjs,js,mjs,jsx}"],
ignores: [
"sandboxes/**",
"dist/**",
"distTest/**",
"packages/**/dist/**",
"packages/**/distTest/**",
"launch*.js",
"**/*.min.js",
"**/at.js",
"**/*AppMeasurement*",
],
plugins: {
local: {
rules: {
license,
},
},
},
rules: {
"local/license": "error",
},
},
{
name: "alloy/shared",
languageOptions: {
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"build:custom": "node scripts/alloyBuilder.js",
"prepare": "husky",
"prepack": "pnpm run clean && babel packages/core/src -d libEs5 --env-name npmEs5 && babel packages/core/src -d libEs6 --env-name npmEs6 && echo '{\"type\":\"commonjs\"}' > libEs5/package.json && echo '{\"type\":\"module\"}' > libEs6/package.json && pnpm run types",
"checkthattestfilesexist": "./scripts/checkThatTestFilesExist.js",
"add-license": "./scripts/add-license.js"
"checkthattestfilesexist": "./scripts/checkThatTestFilesExist.js"
},
"lint-staged": {
"./*.{cjs,mjs,js,jsx}": [
Expand Down Expand Up @@ -110,7 +109,6 @@
"eslint-plugin-react": "^7.37.5",
"glob": "^11.0.3",
"globals": "^16.5.0",
"handlebars": "^4.7.8",
"husky": "^9.1.7",
"lint-staged": "^16.2.6",
"minimatch": "^10.1.1",
Expand All @@ -121,7 +119,6 @@
"recursive-readdir": "^2.2.3",
"rimraf": "^6.1.0",
"semver": "^7.7.3",
"staged-git-files": "^1.3.0",
"testcafe": "^3.7.2",
"testcafe-browser-provider-playwright": "^1.1.0",
"typescript": "^5.9.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/*
Copyright 2023 Adobe. All rights reserved.
Licensed under the Apache License, Version 2.0.
http://www.apache.org/licenses/LICENSE-2.0
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import collectSurferId from "../identities/collectSurferId.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/*
Copyright 2025 Adobe. All rights reserved.
Licensed under the Apache License, Version 2.0.
http://www.apache.org/licenses/LICENSE-2.0
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import collectAllIdentities from "../identities/collectAllIdentities.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed under the Apache License, Version 2.0.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import {
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/components/Consent/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/**
* Request payload object with methods for merging different types of data.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 20219 Adobe. All rights reserved.
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/Personalization/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2019 Adobe. Ackll rights reserved.
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/components/PushNotifications/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/** @import { Identity } from '../../utils/request/types.js' */

/**
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/components/RulesEngine/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/**
* @typedef {Record<string, EventRecord>} EventRegistry
*/
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/core/consent/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/**
* @typedef {Object} ConsentStateMachine
* @property {function(string): void} in
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/core/edgeNetwork/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/** @import { Request } from '../../utils/request/types.js' */

/**
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/core/identity/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/** @import { Logger } from '../../core/types.js' */
/** @import { CookieJar } from '../../utils/types.js' */

Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/core/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/**
* @typedef {object} AlloyMonitor
* @property {function(any): void} [onBeforeLog]
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/utils/request/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/**
* Request object with methods to access and modify request properties.
*
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/utils/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2025 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

/**
* @typedef {Object} Storage
* @property {function(string): string|null} getItem
Expand Down
Loading