Skip to content

Commit a1a0b87

Browse files
Merge branch 'main' into liquid-templates-metrics
2 parents 34cffaf + a3c4d89 commit a1a0b87

File tree

134 files changed

+7325
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+7325
-446
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ module.exports = {
4747
'@typescript-eslint/restrict-template-expressions': 'off',
4848
'@typescript-eslint/unbound-method': 'off',
4949
'@typescript-eslint/no-unsafe-argument': 'warn',
50-
'@typescript-eslint/no-misused-promises': 'warn'
50+
'@typescript-eslint/no-misused-promises': 'warn',
51+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn'
5152
},
5253
overrides: [
5354
{

.github/copilot-instructions.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copilot Instructions
2+
3+
This document provides instructions for GitHub Copilot to assist with reviewing pull requests and performing tasks based on user prompts. It references existing guidelines and role-specific instructions available in this repository.
4+
5+
## Understanding the repository
6+
7+
Read the [README](../README.md) to understand the purpose of this repository and its structure. On high level, this repository contains the following key packages:
8+
9+
- [`action-destinations`](../packages/destination-actions): This contains all cloud-mode destinations. All new destinations are registered manually and the destination metadata id is then updated in [index.ts](../packages/destination-actions/src/index.ts).
10+
- [`browser-destinations`](../packages/browser-destinations): This contains all browser-mode destinations. All new destinations are registered manually and the destination metadata id is then updated in [destination-manifest/index.ts](../packages/destinations-manifest/src/index.ts).
11+
- [`core`](../packages/core): This contains all the core framework for running the destinations. Any changes made here will affect both cloud-mode and browser-mode destinations. Thorough regression testing is required for these changes.
12+
- [`destination-subscriptions`](../packages/destination-subscriptions): This package validates event payloads against an action's subscription AST.
13+
- [`browser-destination-runtime`](../packages/browser-destination-runtime): This package contains the runtime for browser-mode destinations, including the logic for executing actions and handling events.
14+
15+
## Reviewing Pull Requests
16+
17+
When reviewing pull requests, Copilot should:
18+
19+
1. Ensure all the required checks mentioned [here](../docs/pr-guidelines/pr-checks.md) have passed.
20+
2. Follow the expectations outlined in the [Reviewer Guidelines](../docs/pr-guidelines/pull-request-guidance.md).
21+
3. Suggest splitting changes to multiple destinations into separate pull requests.
22+
4. Ensure that the pull request doesn't introduce known breaking changes as called out in the [Pull Request Guidance](../docs/pr-guidelines/pull-request-guidance.md).
23+
24+
## Performing Tasks
25+
26+
When performing tasks based on user prompts, Copilot should:
27+
28+
1. Refer to the relevant guidelines and documentation in this repository.
29+
2. Ensure that any code changes follow the principles outlined in the [Contributor Guidelines](../docs/pr-guidelines/pull-request-guidance.md).
30+
3. Ensure that code changes are implemented using as many framework features as possible, such as conditionally required fields, error handling etc.
31+
4. Write clear unit tests for any new functionality or changes made to existing functionality.
32+
- Use the existing tests as a reference for writing new tests.
33+
- All external calls should be mocked in the tests. For cloud-mode destinations, we use `nock` to mock external calls.

docs/pr-guidelines/pr-checks.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# PR CI Checks
2+
3+
The following checks should pass for all PRs:
4+
5+
- CI / Unit Tests
6+
- CI / Lint
7+
- CI / Validate
8+
- CI / Browser Destination Bundle QA
9+
- CI / Browser tests: actions-core
10+
- Required Field Check / required-field-check
11+
- Test External
12+
- codecov
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PR request guidelines
2+
3+
- The pull request includes a description of testing performed.
4+
- The pull request doesn't introduce a new required field to an already existing action definition. This will result in failures for existing customers.
5+
- Ensure errors are handled as per [error-guidelines](../docs/error-handling.md).
6+
- Ensure the pull request uses framework features such as [Conditionally required fields](https://github.com/segmentio/action-destinations?tab=readme-ov-file#required-fields)
7+
- Check for grammatical and spelling mistakes in descriptions for Action Definition fields and Destination Definition settings.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"eslint-plugin-lodash": "^7.3.0",
5555
"express": "^4.18.2",
5656
"husky": "^7.0.0",
57-
"jest": "^27.3.1",
57+
"jest": "^30.0.3",
5858
"jest-browser-globals": "^25.1.0-beta",
5959
"jest-mock": "^29.3.1",
6060
"karma": "^6.4.1",
@@ -74,7 +74,7 @@
7474
"timers-browserify": "^2.0.12",
7575
"ts-jest": "^27.0.7",
7676
"ts-node": "^9.1.1",
77-
"typescript": "4.9.5",
77+
"typescript": "5.5.4",
7878
"ws": "^8.5.0"
7979
},
8080
"resolutions": {

packages/actions-shared/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/actions-shared",
33
"description": "Shared destination action methods and definitions.",
4-
"version": "1.137.0",
4+
"version": "1.138.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/segmentio/action-destinations",
@@ -37,7 +37,7 @@
3737
},
3838
"dependencies": {
3939
"@amplitude/ua-parser-js": "^0.7.25",
40-
"@segment/actions-core": "^3.156.0",
40+
"@segment/actions-core": "^3.157.0",
4141
"cheerio": "^1.0.0-rc.10",
4242
"dayjs": "^1.10.7",
4343
"escape-goat": "^3",

packages/browser-destination-runtime/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@segment/browser-destination-runtime",
3-
"version": "1.85.0",
3+
"version": "1.86.0",
44
"license": "MIT",
55
"publishConfig": {
66
"access": "public",
@@ -62,7 +62,7 @@
6262
}
6363
},
6464
"dependencies": {
65-
"@segment/actions-core": "^3.156.0"
65+
"@segment/actions-core": "^3.157.0"
6666
},
6767
"devDependencies": {
6868
"@segment/analytics-next": "*"

packages/browser-destinations/destinations/1flow/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@segment/analytics-browser-actions-1flow",
3-
"version": "1.68.0",
3+
"version": "1.69.0",
44
"license": "MIT",
55
"publishConfig": {
66
"access": "public",
@@ -15,7 +15,7 @@
1515
},
1616
"typings": "./dist/esm",
1717
"dependencies": {
18-
"@segment/browser-destination-runtime": "^1.85.0"
18+
"@segment/browser-destination-runtime": "^1.86.0"
1919
},
2020
"peerDependencies": {
2121
"@segment/analytics-next": ">=1.55.0"

packages/browser-destinations/destinations/adobe-target/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@segment/analytics-browser-actions-adobe-target",
3-
"version": "1.87.0",
3+
"version": "1.88.0",
44
"license": "MIT",
55
"publishConfig": {
66
"access": "public",
@@ -16,7 +16,7 @@
1616
},
1717
"typings": "./dist/esm",
1818
"dependencies": {
19-
"@segment/browser-destination-runtime": "^1.85.0"
19+
"@segment/browser-destination-runtime": "^1.86.0"
2020
},
2121
"peerDependencies": {
2222
"@segment/analytics-next": ">=1.55.0"

packages/browser-destinations/destinations/algolia-plugins/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@segment/analytics-browser-actions-algolia-plugins",
3-
"version": "1.63.0",
3+
"version": "1.64.0",
44
"license": "MIT",
55
"publishConfig": {
66
"access": "public",
@@ -15,7 +15,7 @@
1515
},
1616
"typings": "./dist/esm",
1717
"dependencies": {
18-
"@segment/browser-destination-runtime": "^1.85.0"
18+
"@segment/browser-destination-runtime": "^1.86.0"
1919
},
2020
"peerDependencies": {
2121
"@segment/analytics-next": ">=1.55.0"

0 commit comments

Comments
 (0)