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
5 changes: 5 additions & 0 deletions .changeset/cold-needles-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fingerprint/aws-cloudfront-proxy': minor
---

Add support for API V4
20 changes: 20 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
"changelog": [
"@fingerprintjs/changesets-changelog-format",
{
"repo": "fingerprintjs/cloudfront-proxy"
Comment thread
TheUnderScorer marked this conversation as resolved.
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["website", "e2e-tests"],
"privatePackages": {
"version": true,
"tag": true
}
}
10 changes: 10 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"mode": "pre",
"tag": "rc",
"initialVersions": {
"@fingerprint/aws-cloudfront-proxy": "2.1.1",
"e2e-tests": "0.0.0",
"website": "0.0.0"
},
"changesets": []
}
10 changes: 9 additions & 1 deletion .github/workflows/analyze-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ permissions:
contents: write
jobs:
analyze-commits:
name: Generate docs and coverage report
name: Analyze commits
uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1
with:
previewNotes: false

preview-changeset:
name: Preview changeset
uses: fingerprintjs/dx-team-toolkit/.github/workflows/preview-changeset-release.yml@v1
with:
pr-title: ${{ github.event.pull_request.title }}
15 changes: 9 additions & 6 deletions .github/workflows/publish-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ env:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
jobs:
e2e-tests:
name: Run E2E tests on release artifact
runs-on: ubuntu-latest
needs: upload-assets
outputs:
lambda_sha: ${{ steps.sha.outputs.lambda_sha }}
mgmt_lambda_sha: ${{ steps.sha.outputs.mgmt_lambda_sha }}
Expand All @@ -29,9 +30,10 @@ jobs:
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_IAM_AUTH_REGION }}

- uses: actions/setup-node@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
node-version-file: .node-version

- uses: pnpm/action-setup@129abb77bf5884e578fcaf1f37628e41622cc371
with:
Expand Down Expand Up @@ -85,14 +87,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-node@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
node-version-file: .node-version

- uses: pnpm/action-setup@129abb77bf5884e578fcaf1f37628e41622cc371
with:
version: 9

- run: pnpm install

- name: Configure AWS credentials from dev account
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ on:
push:
branches:
- main
- rc

jobs:
build-and-release:
release:
name: 'Build project, run CI checks and publish new release'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-typescript-project.yml@v1
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-sdk-changesets.yml@v1
with:
nodeVersion: 24
appId: ${{ vars.APP_ID }}
runnerAppId: ${{ vars.RUNNER_APP_ID }}
version-command: pnpm changeset:version
Comment thread
mcnulty-fp marked this conversation as resolved.
publish-command: pnpm changeset:publish
language: node
language-version: 24
prepare-command: pnpm build:release
github-release-files: 'lambda_latest.zip,mgmt_lambda_latest.zip'
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
RUNNER_APP_PRIVATE_KEY: ${{ secrets.RUNNER_APP_PRIVATE_KEY }}
14 changes: 8 additions & 6 deletions .github/workflows/terraform-e2e-tests-on-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ jobs:
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_IAM_AUTH_REGION }}

- uses: actions/setup-node@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
node-version-file: .node-version

- uses: pnpm/action-setup@129abb77bf5884e578fcaf1f37628e41622cc371
with:
version: 9

- run: pnpm install

- run: pnpm exec playwright install
Expand Down Expand Up @@ -76,17 +77,18 @@ jobs:
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: ${{ env.AWS_IAM_AUTH_REGION }}

- uses: actions/setup-node@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
node-version-file: .node-version

- uses: pnpm/action-setup@129abb77bf5884e578fcaf1f37628e41622cc371
with:
version: 9

- run: pnpm install && npm install ts-node -g

- run: pnpm build && bash scripts/preparePackage.sh
- run: pnpm build:release
env:
FPCDN: ${{ secrets.MOCK_WARDEN_URL }}
INGRESS_API: ${{ secrets.MOCK_WARDEN_URL }}
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24
61 changes: 0 additions & 61 deletions .releaserc

This file was deleted.

23 changes: 15 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ We prefer using [pnpm](https://pnpm.io/) for installing dependencies and running

For proposing changes, use the standard [pull request approach](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). It's recommended to discuss fixes or new functionality in the Issues, first.

* The `main` and `rc` branches are locked for the push action.
* Releases are created from the `main` branch. If you have CloudFront Integration set up, it is running code from the `main` branch. Pull requests into the `main` branch are not accepted.
* The `rc` branch functions as a candidate for the next release. Create your pull requests into this branch. The code in `rc` must always pass the tests.
* The `main` branches are locked for the push action.
* Releases are created from the `main` branch. If you have CloudFront Integration set up, it is running code from the `main` branch.


### How to build
Expand Down Expand Up @@ -54,10 +53,19 @@ These tests run automatically on every pull request via the [terraform-e2e-tests

### How to release a new version

Every PR should target `rc` branch first. Upon merge, if there are relevant changes a new release candidate is created.
When that happens, an automated PR is created to `main` branch, and E2E tests run against it. If the tests pass, the PR can be merged and the release is created.
We use [changesets](https://github.com/changesets/changesets) for handling release notes. If there are relevant changes, please add them to changeset via `pnpm exec changeset`. You need to run `pnpm install` before doing so.

The integration is automatically released on every push to the main branch if there are relevant changes. The workflow must be approved by one of the maintainers, first.
Every change requires a pre-release first:
```shell
pnpm exec changeset pre enter rc
```

When the PR is merged, the pre-release is created and E2E tests run against it. Once the tests pass, a stable release can be created:
```shell
pnpm exec changeset pre exit
```

The integration is automatically released on tag creation. The workflow must be approved by one of the maintainers, first.

### How to keep your integration up-to-date

Expand All @@ -72,5 +80,4 @@ To achieve this, you can add your custom *host* (not URL) values to the **AWS Se
```
FPJS_CDN_URL: your.cdn.net
FPJS_INGRESS_BASE_HOST: your.api.net
```

```
1 change: 1 addition & 0 deletions e2e/tests/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "e2e-tests",
"version": "0.0.0",
"license": "MIT",
"type": "commonjs",
"devDependencies": {
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@fingerprintjs/fingerprint-pro-cloudfront-lambda-function",
"name": "@fingerprint/aws-cloudfront-proxy",
"version": "2.1.1",
"description": "Fingerprint Pro CloudFront lambda@edge function",
"author": "FingerprintJS, Inc (https://fingerprint.com)",
Expand All @@ -8,12 +8,15 @@
"scripts": {
"prepare": "husky",
"build": "rimraf dist && NODE_OPTIONS=\"--max_old_space_size=4098\" rollup -c rollup.config.js --bundleConfigAsCjs && cp cloudformation/template.yml dist/template.yml",
"build:release": "pnpm build && pnpm prepare-package",
"lint": "eslint --ext .js,.ts --ignore-path .gitignore --max-warnings 0 .",
"lint:fix": "pnpm lint --fix",
"test": "jest",
"test:coverage": "jest --coverage",
"test:dts": "tsc --noEmit --isolatedModules dist/fingerprintjs-pro-cloudfront-lambda-function.d.ts",
"prepare-package": "bash ./scripts/preparePackage.sh"
"prepare-package": "bash ./scripts/preparePackage.sh",
"changeset:publish": "HUSKY=0 changeset publish",
"changeset:version": "changeset version"
},
"main": "dist/fingerprintjs-pro-cloudflare-lambda-function.js",
"sideEffects": false,
Expand All @@ -33,7 +36,9 @@
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.832.0",
"@changesets/cli": "^2.30.0",
"@commitlint/cli": "^19.8.1",
"@fingerprintjs/changesets-changelog-format": "^0.2.0",
"@fingerprintjs/commit-lint-dx-team": "^0.0.2",
"@fingerprintjs/conventional-changelog-dx-team": "^0.1.0",
"@fingerprintjs/eslint-config-dx-team": "^0.1.0",
Expand Down
Loading
Loading