Repository navigation
Release tested script builds and record deployments #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
110 commits
Select commit
Hold shift + click to select a range
4e33371
Fix problem with solana extension
ironbrands16 38373b8
Move from _phantom to phantom
adriaandotcom ea0cd3d
Merge pull request #39 from ironbrands16/patch-1
adriaandotcom f79ba5d
Run prettier via GitHub Action
3d7ccb5
Fix bug in checking phantom.solana
adriaandotcom 65a6c3a
Always expose sa_pageview
adriaandotcom a914c9a
Check for Cloudflare under attack mode param
adriaandotcom de31383
Run prettier via GitHub Action
4924174
Test for all Cloudflare params
adriaandotcom 23e043d
Clean subdomain hostname, fix auto events for links with child elemen…
adriaandotcom dc1a3ef
Add acron and remove trailing comma
adriaandotcom 6e7ce19
Run prettier via GitHub Action
adriaandotcom e717409
Save local changes [no ci]
adriaandotcom 8845936
Add jsdom unit tests
adriaandotcom 46992f6
Fix default test without Browserstack
adriaandotcom 5dad1ea
Add unit test to job
adriaandotcom 770470a
Make sure all node js version are the same
adriaandotcom cda1d7d
Merge pull request #63 from simpleanalytics/codex/set-up-unit-tests-w…
adriaandotcom 3fb3495
Merge branch 'v12' into v12-b
adriaandotcom 065dbb1
Allow overwriting referrer
adriaandotcom ae84e8d
Merge pull request #62 from simpleanalytics/v12-b
adriaandotcom e1702cf
Rename testing file
adriaandotcom 779661a
Run prettier in dry mode [no ci]
adriaandotcom dc35828
Add AGENTS guidance
adriaandotcom f99b45f
Improve AGENTS.md
adriaandotcom fbdd6ee
Add .cursorrules [no ci]
adriaandotcom fb045ce
Merge pull request #64 from simpleanalytics/codex/create-agents.md-fi…
adriaandotcom 6bbf49a
Add modular unit tests and helpers
adriaandotcom d16c953
Merge pull request #65 from simpleanalytics/codex/plan-unit-testing-s…
adriaandotcom 6f06801
Run browserstack not every time, and add linting
adriaandotcom b721ad0
Run browserstack not every time, for real
adriaandotcom 495be42
Require prettier for brwoserstack too
adriaandotcom 6bb5c0d
Rename prettier to linting
adriaandotcom 8bfb9ec
Merge pull request #67 from simpleanalytics/codex/create-agents.md-file
adriaandotcom 0a8a5ff
chore: fix eslint errors
adriaandotcom 47bda2f
Merge pull request #68 from simpleanalytics/codex/fix-eslint-errors
adriaandotcom bfd91a4
feat(auto-events): skip automation when data-simple-event present
adriaandotcom 912f482
Add manual build step
adriaandotcom 5ee72b9
Merge branch 'v12' into codex/skip-automated-events-for-data-simple-e…
adriaandotcom 0f12612
Merge pull request #69 from simpleanalytics/codex/skip-automated-even…
adriaandotcom 82fcbb4
Rename to Testing Suite
adriaandotcom e38d8f6
Merge branch 'main' into v12
adriaandotcom 21ae5b7
fix metadata reload in appendMetadata
adriaandotcom c256994
Merge pull request #70 from simpleanalytics/codex/fix-sa_metadata-loa…
adriaandotcom 1835428
Bind sendBeacon calls
adriaandotcom f37e4ee
Merge branch 'v12' into codex/implement-fix-for-sendbeacon-error
adriaandotcom cfdd6f6
Merge pull request #71 from simpleanalytics/codex/implement-fix-for-s…
adriaandotcom 7dc389f
Add callback support to sa_pageview
adriaandotcom 3ac0008
Merge branch 'v12' into codex/add-callback-to-sa_pageview
adriaandotcom 76b0426
Merge pull request #72 from simpleanalytics/codex/add-callback-to-sa_…
adriaandotcom cba0b20
Checkout dist after test:unit
adriaandotcom 2d165c9
Reuse query param filter for manual pageviews
adriaandotcom 984f634
Merge branch 'v12' into codex/fix-query-param-handling-in-sa_pageview
adriaandotcom 2bfd05c
Merge pull request #74 from simpleanalytics/codex/fix-query-param-han…
adriaandotcom 8ed3786
test: add metadata collector attr test
adriaandotcom 28bf151
Merge branch 'v12' into codex/add-test-for-data-metadata-collector
adriaandotcom e1b021e
Merge pull request #75 from simpleanalytics/codex/add-test-for-data-m…
adriaandotcom 571b372
Run npm run build
adriaandotcom c938f2f
Add tel link tracking to auto events
adriaandotcom 67edab1
Add unit tests for auto-events
adriaandotcom defc6a0
Warn when metadata collector function is not found
adriaandotcom a216bda
Run npm run build
adriaandotcom aa513da
Merge pull request #77 from simpleanalytics/codex/add-unit-tests-for-…
adriaandotcom 78bc66d
Fix delayed phone link events
adriaandotcom dc116ae
Merge pull request #76 from simpleanalytics/codex/add-tel--clicks-to-…
adriaandotcom 9294410
fix allowParams regex to be case insensitive
adriaandotcom c869bb0
Merge pull request #81 from simpleanalytics/codex/make-allow-params-r…
adriaandotcom 443ee6b
Merge main into v12
52d297e
Fix merged BrowserStack test setup
3e8bc7e
Collect compact query parameter names via ignore metrics
c70cae6
Run BrowserStack tests on Node.js 22.16
84ef41b
Use numeric BrowserStack test exit codes
6a74a12
Sync v12 conflict files with current main
d979bee
Merge current main into v12
simple-analytics-ai[bot] 62d0cda
Use querykeys for query parameter name collection
3a6d633
Fix v12 CI after main sync
a2a876c
Document tracker compatibility and size priorities for agents (#115)
simple-analytics-ai[bot] 38248a0
Support inline events in the main v12 script (#106)
simple-analytics-ai[bot] ee45d52
Preserve distinct manual pageviews in v12 (#108)
simple-analytics-ai[bot] b568ca3
Leave phone click navigation to the website and browser (#111)
simple-analytics-ai[bot] 3395422
Respect the configured namespace for manual pageviews (#110)
simple-analytics-ai[bot] 58f6679
Fix cmd-click for auto events (#78)
adriaandotcom 6af229d
Count Cloudflare challenge arrivals as unique (#112)
simple-analytics-ai[bot] a3f1a4a
Accept current and legacy script deployment headers (#117)
simple-analytics-ai[bot] 6b84d42
Remove retired Cloudflare app build from v12 (#121)
simple-analytics-ai[bot] 5ce3453
fix: retain phone metadata with titled events (#122)
simple-analytics-ai[bot] fa3cbff
test: require current script version in SRI header checks (#123)
simple-analytics-ai[bot] 8f8f885
Stop ignoring screen size when scrolled is ignored (#127)
simpleanalytics-agent 138b76b
Set the loaded flag for custom event globals (#129)
simpleanalytics-agent 58fa30d
Merge branch 'main' into v12
simpleanalytics-agent 5ad1bf5
Count label clicks once in inline events (#133)
simpleanalytics-agent d46eefe
Run the pageview callback when the pageview is skipped (#132)
simpleanalytics-agent c0cda96
Send visible time on page when the page gets hidden (#134)
simpleanalytics-agent 3f1cffe
Ask agents to weigh script size against edge cases (#136)
simpleanalytics-agent 61d2ab0
Send the embedded script URL with pageviews (#138)
simpleanalytics-agent d1c4316
Merge branch 'main' into v12
adriaandotcom 6bc409a
Use the caddy destination in the deploy header test
663ecbf
Test that automatic link clicks are not cancelled
5b4622c
Drop the placeholder callback in automatic link events
7794c2c
Fall back to a pixel when sendBeacon throws
60567ae
Limit the Cloudflare unique check to this site's referrers
9e44595
Drop the referrer on Cloudflare challenge arrivals
245f23f
Detect Cloudflare arrivals from the raw referrer host
71c84b9
Compare real hostnames to detect same-site referrers
c689b5d
Release tested script builds and record deployments
f546d3c
Merge main into feature/embed-script-release-workflow
b328795
Record deployments per destination and release only from main
75b052e
Address release and deployment review feedback
e14d12a
Reuse an existing draft when publishing a release
52c6d8a
Treat any published release as released
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| name: Release | ||
|
|
||
| # Bumping VERSION in compile.js on main publishes GitHub Release vN with the | ||
| # BrowserStack-tested build. Deploying it stays a manual `pnpm run deploy`. | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: [compile.js] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: release | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| version: | ||
| # workflow_dispatch can run on any branch, but only main is released | ||
| if: github.ref == 'refs/heads/main' | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| tag: ${{ steps.version.outputs.tag }} | ||
| released: ${{ steps.version.outputs.released }} | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
|
|
||
| - name: Read the script version | ||
| id: version | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| version=$(sed -n 's/^const VERSION = \([0-9][0-9]*\);$/\1/p' compile.js) | ||
| if [ -z "$version" ]; then | ||
| echo "::error file=compile.js::Unable to read const VERSION" | ||
| exit 1 | ||
| fi | ||
| tag="v$version" | ||
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | ||
| # A draft doesn't count (publishing can fail after it's created), and | ||
| # this read-only token can't see drafts anyway | ||
| if gh release view "$tag" --repo "$GITHUB_REPOSITORY" --json isDraft \ | ||
| --jq ".isDraft | not" 2> /dev/null | grep -qx true; then | ||
| echo "released=true" >> "$GITHUB_OUTPUT" | ||
| echo "$tag is already released; bump VERSION in compile.js to release." >> "$GITHUB_STEP_SUMMARY" | ||
| fi | ||
|
|
||
| test: | ||
| needs: version | ||
| if: needs.version.outputs.released != 'true' | ||
| uses: ./.github/workflows/browserstack.yml | ||
| with: | ||
| upload-dist: true | ||
| secrets: inherit | ||
|
|
||
| publish: | ||
| needs: [version, test] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/download-artifact@v8 | ||
| with: | ||
| name: dist | ||
| path: dist | ||
|
|
||
| - name: Publish ${{ needs.version.outputs.tag }} | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| TAG: ${{ needs.version.outputs.tag }} | ||
| run: | | ||
| tar -czf "scripts-$TAG.tar.gz" dist | ||
| # Reuse the draft of an earlier run whose publish failed | ||
| if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" > /dev/null 2>&1; then | ||
| gh release upload "$TAG" "scripts-$TAG.tar.gz" --repo "$GITHUB_REPOSITORY" --clobber | ||
|
simpleanalytics-agent marked this conversation as resolved.
|
||
| else | ||
| gh release create "$TAG" "scripts-$TAG.tar.gz" \ | ||
| --repo "$GITHUB_REPOSITORY" \ | ||
| --target "$GITHUB_SHA" \ | ||
| --title "$TAG" \ | ||
| --generate-notes \ | ||
| --draft | ||
| fi | ||
| gh release edit "$TAG" --repo "$GITHUB_REPOSITORY" \ | ||
| --target "$GITHUB_SHA" --draft=false --latest | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| node_modules | ||
| *.log | ||
| .env | ||
| /dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.