Skip to content
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

ref(node): Allow node stack parser to work in browser context #5134

Closed
wants to merge 182 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
10fe77f
ref(tracing): Remove references to @sentry/apm (#4845)
AbhiPrasad Apr 7, 2022
f501391
ref(core): Delete `API` class (#4848)
AbhiPrasad Apr 7, 2022
1997ad5
ref(tracing): Delete deprecated `startSpan` and `child` methods (#4849)
AbhiPrasad Apr 7, 2022
5f0d7c2
ref(core): Remove `whitelistUrls`/`blacklistUrls` (#4850)
AbhiPrasad Apr 7, 2022
67bbb65
ref(gatsby): Remove `Sentry` from window (#4857)
AbhiPrasad Apr 7, 2022
c481f55
ref(hub): Remove `getActiveDomain` (#4858)
AbhiPrasad Apr 7, 2022
8ed1e9e
ref(types): Remove deprecated `user` dsn field (#4864)
AbhiPrasad Apr 7, 2022
ba4561c
ref(hub): Remove `setTransaction` scope method (#4865)
AbhiPrasad Apr 7, 2022
ebff719
ref: Drop support for Node 6 (#4851)
AbhiPrasad Apr 7, 2022
5a050ee
ref(tracing): Rename `registerRequestInstrumentation` -> `instrumentO…
AbhiPrasad Apr 7, 2022
bd509d0
fix(test): Increase MongoMemoryServer creation timeout (#4881)
Lms24 Apr 7, 2022
729aced
ref(node): Remove deprecated `frameContextLines` (#4884)
timfish Apr 7, 2022
0604aef
ref(browser): Remove top level eventbuilder exports (#4887)
timfish Apr 7, 2022
fc6aa54
ref(build): Update to TypeScript 3.8.3 (#4895)
lobsterkatie Apr 7, 2022
804640d
ref(bundles): Stop publishing CDN bundles on npm (#4901)
lforst Apr 8, 2022
c64ca5e
ref(types): Delete `RequestSessionStatus` enum (#4889)
AbhiPrasad Apr 8, 2022
d096b02
ref(types): Delete Status enum (#4891)
AbhiPrasad Apr 8, 2022
9b1dfdf
ref(build): Rename `dist` directories to `cjs` (#4900)
Lms24 Apr 8, 2022
7f56b0f
ref(integrations): Remove old `angular`, `ember`, and `vue` integrati…
AbhiPrasad Apr 8, 2022
e6149ad
ref(types): Delete `SessionStatus` enum (#4890)
AbhiPrasad Apr 8, 2022
dcb1bb8
meta: 7.0.0-alpha.0 changelog (#4892)
AbhiPrasad Apr 8, 2022
87e9894
fix(build): Skip flags file when building integration bundles (#4906)
lobsterkatie Apr 9, 2022
bac2d91
fix(dev): Standardize yarn `clean` scripts (#4909)
lobsterkatie Apr 11, 2022
62e7189
chore(dev): Remove redundant `.gitignore` in `utils` package (#4905)
lobsterkatie Apr 11, 2022
53027de
ref(dev): Centralize jest config (#4907)
lobsterkatie Apr 11, 2022
f5a6ca8
release: 7.0.0-alpha.0
getsentry-bot Apr 11, 2022
b42472a
feat(docs): Add migration guide for v7 (#4910)
lforst Apr 11, 2022
075d59b
feat(browser): Add debugging hints to browser integration tests (#4914)
lobsterkatie Apr 11, 2022
07d4ffd
ref(various): Remove usage of deprecated `event.stacktrace` (#4885)
timfish Apr 11, 2022
5d38a7e
chore(dev): Update `jest` and friends (#4897)
lobsterkatie Apr 11, 2022
05292b9
fix(dev): Fix unit test debugging configuration (#4915)
lobsterkatie Apr 12, 2022
a9cc619
ref: Port functionality from `Backend` to `Client` (#4911)
Lms24 Apr 12, 2022
43cb4a1
feat(docs): Add section for renaming of CDN bundles (#4918)
lforst Apr 12, 2022
ea09e78
ref(backend): Delete `Backend` classes (#4919)
Lms24 Apr 12, 2022
2ffd78c
fix(wasm): Ensure wasm bundle exists before running wasm tests (#4916)
lobsterkatie Apr 12, 2022
6f09dd7
feat: Expose configurable stack parser (#4902)
timfish Apr 12, 2022
08f50c8
ref(browser): Remove stack parser support for Opera pre v15 (#4923)
timfish Apr 12, 2022
052263b
ref(tracing): Update `setMeasurements` to only set a single measureme…
lforst Apr 13, 2022
b35fed9
feat(tracing): Make `setMeasurement` public API (#4933)
lforst Apr 13, 2022
254e40e
ref(types): Stop using `Severity` enum (#4926)
lobsterkatie Apr 14, 2022
e214325
ref(build): Turn on `isolatedModules` TS option (#4896)
lobsterkatie Apr 14, 2022
3c7faf9
chore(types): Update `@types/jest` (#4929)
lobsterkatie Apr 14, 2022
fa34914
ref: Inject Transports into Client (#4921)
Lms24 Apr 14, 2022
b7c2494
feat(docs): Add `Backend` removal and `Transport` injection to migrat…
Lms24 Apr 14, 2022
b15912a
feat(docs): Add enum removal and deprecation section to migration doc…
Lms24 Apr 14, 2022
ec5ebe9
feat: Add `name` field to `EventProcessor` (#4932)
lforst Apr 14, 2022
362375c
meta: 7.0.0-alpha.1 changelog (#4939)
AbhiPrasad Apr 14, 2022
23f8d6e
release: 7.0.0-alpha.1
getsentry-bot Apr 14, 2022
e5f26a5
chore(gatsby): Create type declarations for gatsby plugin files (#4928)
lobsterkatie Apr 14, 2022
92bf5d3
chore(dev): Remove `tslint` (#4940)
AbhiPrasad Apr 14, 2022
e816c34
ref(test): Switch to `mongodb-memory-server-global` (#4872)
onurtemizkan Apr 14, 2022
9cf57fd
fix(tests): Use non-delayed success endpoints to test `crashed` and `…
onurtemizkan Apr 14, 2022
9f3253d
ref(utils): Remove `forget` async utility function (#4941)
Lms24 Apr 14, 2022
1660047
feat(tracing): Add GB unit to device memory tag value (#4935)
dashed Apr 14, 2022
3f43c39
fix(build): Cache gatsby plugin types files in CI (#4944)
lobsterkatie Apr 14, 2022
d62c758
fix(tests): Fix type errors in tests (#4908)
lobsterkatie Apr 14, 2022
0d811bd
ref(node): Remove `raven-node` backward-compat code (#4942)
AbhiPrasad Apr 18, 2022
fe845d9
ref(build): Split up rollup config code (#4950)
lobsterkatie Apr 19, 2022
34d4ddb
ref(tests): Suppress unconstructive listener and open handle warnings…
onurtemizkan Apr 19, 2022
5ed6066
feat(core): Introduce separate client options (#4927)
AbhiPrasad Apr 19, 2022
1cc0e8a
fix(dev): Check out correct commit in manual GHA `Build & Test` workf…
lobsterkatie Apr 20, 2022
1b32e54
ref(core): Simplify the setup logic of integrations (#4952)
lforst Apr 20, 2022
03d978a
ref(build): Rename CDN bundles to be es6 per default (#4958)
lforst Apr 21, 2022
67cb07a
fix(angular): Use Angular compiler to compile @sentry/angular (#4641)
Lms24 Apr 21, 2022
4581faa
doc(angular): Add Angular migration instructions to migration doc (#4…
Lms24 Apr 21, 2022
deac0eb
ref: Enforce `stackParser` through options. (#4953)
AbhiPrasad Apr 21, 2022
c2ebd42
feat(tracing): Add Prisma ORM integration. (#4931)
onurtemizkan Apr 21, 2022
ec384db
meta(gha): Deploy action `enforce-license-compliance.yml` (#4961)
chadwhitacre Apr 21, 2022
df555d1
fix(dev): Correctly lint `scripts` typescript files (#4963)
lobsterkatie Apr 21, 2022
18257b1
feat(angular): Log warning if SDK is used with an older Angular versi…
Lms24 Apr 22, 2022
b5abe03
ref: Switch to new transports (#4943)
AbhiPrasad Apr 25, 2022
4a35b8d
chore(dev): Update `caniuse-lite` (#4975)
lobsterkatie Apr 26, 2022
8d52e14
chore(dev): Update `ts-node` to 10.7 (#4976)
lobsterkatie Apr 26, 2022
84555ac
fix(build): Replace `git.io` links with redirect targets (#4986)
asottile-sentry Apr 26, 2022
e6a51cb
fix(tracing): Adjust `sideEffects` package.json entry for v7 (#4987)
Lms24 Apr 26, 2022
a8591ea
ref: Delete old transports (#4967)
AbhiPrasad Apr 26, 2022
e0374a3
ref(minimal): Delete `@sentry/minimal` (#4971)
AbhiPrasad Apr 26, 2022
5037d76
fix(nextjs): Fix missing types build in `install-sentry-from-branch` …
kamilogorek Apr 26, 2022
299aeb3
ref: Delete store endpoint code (#4969)
AbhiPrasad Apr 26, 2022
a5c3808
fix(dev): Fix linting for top-level `scripts` folder (#4977)
lobsterkatie Apr 27, 2022
4176bcb
chore: set ignoreSentryErrors to true (#4994)
vladanpaunovic Apr 27, 2022
4ca2de2
ref(tests): Move top-level jest config to `jest` folder (#4978)
lobsterkatie Apr 27, 2022
87cf8c5
fix(tests): Silence dummy output in tests (#4979)
lobsterkatie Apr 27, 2022
8145ce9
ref(nextjs): Update webpack-plugin and change how cli binary is detec…
AbhiPrasad Apr 27, 2022
a71cfb9
fix(dev): Remove eslint cache when cleaning repo (#4980)
lobsterkatie Apr 27, 2022
e86fa94
ref(core): Delete API Details (#4999)
AbhiPrasad Apr 27, 2022
3a512bc
feat(dev): Add VSCode debugger config for ts-node scripts (#4990)
lobsterkatie Apr 27, 2022
7856952
ref: Add argument-less overload to `resolvedSyncPromise` (#5000)
lforst Apr 27, 2022
d619372
fix(hub): Add missing parameter to `captureException` docstring (#5001)
lobsterkatie Apr 27, 2022
c55003f
chore(build): Remove unnecessary `esModuleInterop` settings (#4991)
lobsterkatie Apr 27, 2022
69028bf
ref: Remove unneeded logic from transports (#5002)
lforst Apr 28, 2022
9e46944
ref(build): Switch tsconfig `target` to es6 (#5005)
lobsterkatie Apr 28, 2022
7f04d33
feat(build): Add sucrase build foundations (#4992)
lobsterkatie Apr 28, 2022
aefa9b1
ref: Refactor transport, request, and client report types (#5007)
lforst Apr 28, 2022
ebc938a
fix(serverless): Adjust v6 Lambda layer hotfix for v7 (#5006)
Lms24 Apr 28, 2022
de2822b
feat(transport): Add client report hook to `makeTransport` (#5008)
lforst Apr 28, 2022
389f4ee
ref(browser): Remove showReportDialog on browser client (#4973)
AbhiPrasad Apr 28, 2022
b3fddcd
feat(hub): Remove _invokeClient (#4972)
AbhiPrasad Apr 28, 2022
f979104
docs(transports): Update Migration document with custom Transport cha…
Lms24 Apr 28, 2022
1c5bff0
ref(core): Make event processing logs warnings (#5010)
AbhiPrasad Apr 28, 2022
031ffa7
docs(core): Improve documentation of `Options` and `ClientOptions` pr…
Lms24 Apr 29, 2022
dd1fb29
ref: Record dropped events in `BaseClient` (#5017)
lforst Apr 29, 2022
b450538
ref: Add back client reporting to `BrowserClient` (#5018)
lforst Apr 29, 2022
e16a699
test(tracing): Add Prisma ORM integration tests. (#4962)
onurtemizkan Apr 29, 2022
f18a938
fix(gatsby): Add script to ensure types files exist when testing (#5020)
lobsterkatie Apr 29, 2022
69e6275
fix(build): Fix temporary sucrase CI jobs (#5021)
lobsterkatie Apr 29, 2022
1130c1c
feat(build): Add various rollup plugins to sucrase build (#4993)
lobsterkatie Apr 30, 2022
16356cb
fix(tests): Add `const`-to-`var` ts-jest transformer (#5022)
lobsterkatie May 2, 2022
2df499b
ref: Make it easier to use stackParser (#5015)
AbhiPrasad May 3, 2022
d8fc94c
test(utils): Remove usage of testOnlyIfNodeVersionAtLeast(8) (#5025)
AbhiPrasad May 3, 2022
00c00fa
ref(browser): Don't use Breadcrumbs integration in send event flow (#…
lforst May 3, 2022
39553b5
ref: Remove unused `_sendEvent` method in base client (#5026)
lforst May 3, 2022
c9e8997
meta: 7.0.0-beta.0 CHANGELOG (#5011)
AbhiPrasad May 3, 2022
3532b33
feat: Export browser integrations individually (#5028)
AbhiPrasad May 3, 2022
50361b6
release: 7.0.0-beta.0
getsentry-bot May 3, 2022
add82b4
Merge branch 'release/7.0.0-beta.0' into 7.x
May 4, 2022
1b924e7
chore(browser): Rename `UserAgent` integration to `HttpContext` (#5027)
Lms24 May 4, 2022
794f65b
fix(browser): Change `UserAgent` export to `HttpContext` (#5033)
Lms24 May 4, 2022
6496a11
ref: Remove `critical` severity (#5032)
lforst May 4, 2022
9782d69
ref: Delete unneeded `SDK_NAME` (#5040)
lforst May 5, 2022
419416a
docs(migration): Add TLDR to v7 migration docs (#5041)
lforst May 5, 2022
1e210fe
chore: update sentry logo in readme files (#5045)
mattjohnsonpint May 5, 2022
c9e3602
fix(tracing): Remove `isInstanceOf` check in Hub constructor (#5046)
Lms24 May 6, 2022
8b16378
ref(tracing): Reset IdleTimeout based on activities count (#5044)
AbhiPrasad May 6, 2022
8d475b1
ref(utils): Clean up dangerous type casts in object helper file (#5047)
lforst May 9, 2022
5bd31ac
chore: Add NextJS cli fix to changelog (#5055)
AbhiPrasad May 9, 2022
8d36f0b
ref(utils): Add logic to enable skipping of normalization (#5052)
lforst May 9, 2022
19a9d00
feat(build): Vendor polyfills injected during build (#5051)
lobsterkatie May 9, 2022
904b2d3
fix(integrations): Mark ExtraErrorData as already normalized (#5053)
lforst May 9, 2022
cb9260f
feat(build): Add polyfill-extraction rollup plugin (#5023)
lobsterkatie May 10, 2022
1342c42
ref(node): Explicitly pass down node transport options (#5057)
AbhiPrasad May 10, 2022
52af0b1
ref(browser): Unify BrowserTransportOptions (#5058)
AbhiPrasad May 10, 2022
94554b3
ref(nextjs): Use new build process in vercel script (#5065)
lobsterkatie May 10, 2022
f715933
ref(build): Use rollup/sucrase for non-watch npm builds (#5035)
lobsterkatie May 10, 2022
529650c
chore(build): Handle npm tarballs (#5067)
lobsterkatie May 10, 2022
73ee42b
fix yarn.lock
lobsterkatie May 11, 2022
46400ff
chore(dev): Update `caniuse-lite` (#5069)
lobsterkatie May 11, 2022
5beee11
fix(utils): Consider 429 responses in transports (#5062)
lforst May 11, 2022
656d7c4
ref(hub): Convert `Session` class to object and functions (#5054)
Lms24 May 11, 2022
8c185db
fix(build): Fix references to `rollup.bundle.config.js` (#5074)
lobsterkatie May 11, 2022
7bf6540
fix(tests): Fix node integration test linting and type errors (#5070)
lobsterkatie May 11, 2022
6536eb6
chore(docs): Fix unresolved rebase conflict in Migration.MD (#5076)
Lms24 May 11, 2022
cd71864
feat(react): Add react-router-v6 integration (#5042)
onurtemizkan May 11, 2022
7723d32
ref(build): Use sucrase for `watch` npm builds (#5059)
lobsterkatie May 11, 2022
6b3ea05
ref(build): Improve logging in prepack scripts (#5071)
lobsterkatie May 11, 2022
c8d9905
ref(build): Remove `es5`, `cjs`, and `esm` build commands (#5073)
lobsterkatie May 11, 2022
23982cf
chore(dev): Remove redundant `prepublishOnly` build step in CI (#5083)
lobsterkatie May 12, 2022
e5bfbaa
feat(dev): Add default Node version for CI jobs (#5081)
lobsterkatie May 12, 2022
d9722dc
ref(dev): Use `lerna exec` for top-level `link:yarn` yarn script (#5084)
lobsterkatie May 12, 2022
e39b3f6
feat(build): Add args and templates to rollup debugger plugin (#5085)
lobsterkatie May 12, 2022
042e96e
fix(types): Make `@sentry/types` a runtime dependency in gatsby and n…
lobsterkatie May 12, 2022
f4a1840
ref(utils): Remove `Object.setPrototypeOf` polyfill (#5087)
lobsterkatie May 12, 2022
1badac1
ref(node): Improve Node manual test logging (#5088)
lobsterkatie May 12, 2022
28c09ad
ref(core): Log warning on NOK transport response (#5091)
lforst May 12, 2022
845346a
fix(dev): Restrict size check action to PRs (#5082)
lobsterkatie May 12, 2022
10bca50
meta: 7.0.0-beta.1 changelog (#5092)
AbhiPrasad May 12, 2022
30a9092
release: 7.0.0-beta.1
getsentry-bot May 12, 2022
472a473
Merge branch 'release/7.0.0-beta.1' into 7.x
May 12, 2022
e0ad5c1
fix(ember): Export sha hashes of injected scripts (#5089)
lforst May 13, 2022
5c34152
ref(serverless): Do not throw on flush error (#5090)
lforst May 13, 2022
8a4039d
ref(serverless): Use GitHub action to zip lambda layer (second try) (…
antonpirker May 13, 2022
25aed4d
ref(serverless): Improve handling of SDK version in GitHub action (#5…
antonpirker May 13, 2022
fa7e3b7
ref(serverless): Correctly exit on failed version extraction during b…
kamilogorek May 13, 2022
ce665e2
ref(build): Run repo-level builds in parallel (#5094)
lobsterkatie May 13, 2022
3534f15
ref(dev): Split up top-level `yarn clean` script (#5095)
lobsterkatie May 13, 2022
cac6312
fix(build): Fix express import in `gcpfunction` (#5097)
lobsterkatie May 13, 2022
98bc01a
ref(dev): Consolidate `.gitignore` files (#5096)
lobsterkatie May 13, 2022
78d7304
add changelog entries (#5102)
lobsterkatie May 13, 2022
6b6e746
fix(build): Narrow scope of build cache in GHA (#5105)
lobsterkatie May 17, 2022
774065f
chore(dev): Clean up main tsconfigs (#5114)
lobsterkatie May 17, 2022
797fe90
fix(build): Strip `eslint-enable` comments in rollup plugin (#5112)
lobsterkatie May 17, 2022
95db446
fix(build): Prevent redundant typechecking (#5115)
lobsterkatie May 17, 2022
66a6b59
ref(build): Use sucrase for es6 bundles (#5111)
lobsterkatie May 17, 2022
33e48ca
chore(tests): Fix react `act` warning in tests (#5113)
lobsterkatie May 17, 2022
0a6b4f2
feat(utils): Introduce Baggage API (#5066)
AbhiPrasad May 17, 2022
888f2b8
chore(build): Move aws lambda build step (#5123)
lobsterkatie May 18, 2022
a917dda
fix(build): Ensure bundle builds have needed dependencies (#5119)
lobsterkatie May 18, 2022
efbd343
docs(migration): Add upgrading information for multiple Sentry packag…
Lms24 May 18, 2022
d478c77
feat(core): Send Baggage in Envelope Header (#5104)
Lms24 May 18, 2022
8d08a8b
Change DSN in Lambda Layer to point to relay running in Lambda Extens…
antonpirker May 18, 2022
457b806
feat: Add attachments API (#5004)
timfish May 18, 2022
a8a9a9f
node parser for browser
timfish May 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 17 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ module.exports = {
ecmaVersion: 2018,
},
extends: ['@sentry-internal/sdk'],
ignorePatterns: ['coverage/**', 'build/**', 'dist/**', 'esm/**', 'examples/**', 'test/manual/**', 'types/**'],
ignorePatterns: [
'coverage/**',
'build/**',
'dist/**',
'cjs/**',
'esm/**',
'examples/**',
'test/manual/**',
'types/**',
],
overrides: [
{
files: ['*.ts', '*.tsx', '*.d.ts'],
Expand All @@ -24,6 +33,12 @@ module.exports = {
project: ['tsconfig.test.json'],
},
},
{
files: ['jest/**/*.ts', 'scripts/**/*.ts'],
parserOptions: {
project: ['tsconfig.dev.json'],
},
},
{
files: ['*.tsx'],
rules: {
Expand All @@ -33,7 +48,7 @@ module.exports = {
},
},
{
files: ['scenarios/**'],
files: ['scenarios/**', 'rollup/**'],
parserOptions: {
sourceType: 'module',
},
Expand Down
125 changes: 104 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,28 @@ on:
required: false

env:
DEFAULT_NODE_VERSION: '16'

HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }}

CACHED_DEPENDENCY_PATHS: |
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/**/node_modules
~/.cache/ms-playwright/
~/.cache/mongodb-binaries/

# DEPENDENCY_CACHE_KEY: can't be set here because we don't have access to yarn.lock

# packages/utils/cjs and packages/utils/esm: Symlinks to the folders inside of `build`, needed for tests
CACHED_BUILD_PATHS: |
${{ github.workspace }}/packages/**/build
${{ github.workspace }}/packages/**/dist
${{ github.workspace }}/packages/**/esm
${{ github.workspace }}/packages/*/build
${{ github.workspace }}/packages/ember/*.d.ts
${{ github.workspace }}/packages/ember/instance-initializers
${{ github.workspace }}/packages/serverless/dist-awslambda-layer/*.zip
${{ github.workspace }}/packages/gatsby/*.d.ts
${{ github.workspace }}/packages/core/src/version.ts
${{ github.workspace }}/dist-serverless
${{ github.workspace }}/packages/utils/cjs
${{ github.workspace }}/packages/utils/esm

BUILD_CACHE_KEY: ${{ github.event.inputs.commit || github.sha }}

Expand All @@ -39,8 +45,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
# so no need to reinstall them
- name: Compute dependency cache key
Expand All @@ -66,8 +76,13 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
# ember won't build under node 16, at least not with the versions of the ember build tools we use
node-version: '14'
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand All @@ -86,31 +101,69 @@ jobs:
# this file) to a constant and skip rebuilding all of the packages each time CI runs.
if: steps.cache_built_packages.outputs.cache-hit == ''
run: yarn build
# We are performing a `prepublishOnly` step manually because build workflow is not responsible for publishing
# the actual release. It only creates artifacts which then are uploaded and used by another workflow.
# Because of that, any `prepublishOnly` script is skipped and files it produces are not included in the tarball.
# We also cannot use `prepare` script which would be more suited, because it's run only before `pack` is called,
# and it's done from a `release` workflow and not here.
- name: Run prepublishOnly script
if: startsWith(github.ref, 'refs/heads/release/')
run: yarn prepublishOnly
- name: Save SDK version for later
run: |
echo "Saving SDK_VERSION for later"
cat packages/core/src/version.ts | awk -F"'" '{print $2}' > dist-serverless/version
[ ! -z $(cat dist-serverless/version) ] && echo SDK_VERSION=$(cat dist-serverless/version) || (echo "Version extraction failed" && exit 1)
outputs:
# this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
# `job_build` can't see `job_install_deps` and what it returned)
dependency_cache_key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}

job_build_aws_lambda_layer:
name: Build AWS Lambda Layer
needs: job_build
runs-on: ubuntu-latest
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Check build cache
uses: actions/cache@v2
with:
path: ${{ env.CACHED_BUILD_PATHS }}
key: ${{ env.BUILD_CACHE_KEY }}
- name: Get SDK version
run: |
export SDK_VERSION=$(cat dist-serverless/version)
echo "SDK_VERSION=$SDK_VERSION" | tee -a $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ env.HEAD_COMMIT }}
path: |
dist-serverless/*
- uses: getsentry/action-build-aws-lambda-extension@v1
with:
artifact_name: ${{ env.HEAD_COMMIT }}
zip_file_name: sentry-node-serverless-${{ env.SDK_VERSION }}.zip

job_size_check:
name: Size Check
needs: job_build
timeout-minutes: 15
runs-on: ubuntu-latest
# Size Check will error out outside of the context of a PR
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '12'
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand All @@ -137,8 +190,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand All @@ -160,8 +217,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand All @@ -184,8 +245,12 @@ jobs:
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand All @@ -207,7 +272,6 @@ jobs:
${{ github.workspace }}/packages/integrations/build/bundles/**
${{ github.workspace }}/packages/tracing/build/bundles/**
${{ github.workspace }}/packages/**/*.tgz
${{ github.workspace }}/packages/serverless/dist-awslambda-layer/*.zip

job_unit_test:
name: Test (Node ${{ matrix.node }})
Expand All @@ -217,10 +281,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [6, 8, 10, 12, 14, 16]
node: [8, 10, 12, 14, 16]
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand All @@ -238,7 +304,9 @@ jobs:
- name: Run tests
env:
NODE_VERSION: ${{ matrix.node }}
run: yarn test-ci
run: |
[[ $NODE_VERSION == 8 ]] && yarn add --dev --ignore-engines --ignore-scripts --ignore-workspace-root-check ts-node@8.x
yarn test-ci
- name: Compute test coverage
uses: codecov/codecov-action@v1

Expand All @@ -254,6 +322,8 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -286,11 +356,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
# TODO: removing `fetch-depth` below seems to have no effect, and the commit which added it had no description,
# so it's not clear why it's necessary. That said, right now ember tests are xfail, so it's a little hard to
# tell if it's safe to remove. Once ember tests are fixed, let's try again with it turned off, and if all goes
# well, we can pull it out.
with:
ref: ${{ env.HEAD_COMMIT }}
# TODO: removing `fetch-depth` below seems to have no effect, and the commit which added it had no description,
# so it's not clear why it's necessary. That said, right now ember tests are xfail, so it's a little hard to
# tell if it's safe to remove. Once ember tests are fixed, let's try again with it turned off, and if all goes
# well, we can pull it out.
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v1
Expand Down Expand Up @@ -341,10 +412,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '16'
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -379,8 +452,12 @@ jobs:
steps:
- name: Check out current commit (${{ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -408,8 +485,12 @@ jobs:
steps:
- name: Check out current commit (${ env.HEAD_COMMIT }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -441,6 +522,8 @@ jobs:
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v2
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/enforce-license-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Enforce License Compliance

on:
push:
branches: [master, main, release/*]
pull_request:
branches: [master, main]

jobs:
enforce-license-compliance:
runs-on: ubuntu-latest
steps:
- name: 'Enforce License Compliance'
uses: getsentry/action-enforce-license-compliance@main
with:
fossa_api_key: ${{ secrets.FOSSA_API_KEY }}
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ packages/*/package-lock.json
package-lock.json

# build and test
# SDK builds
build/
packages/*/dist/
packages/*/esm/
# various integration test builds
dist/
coverage/
scratch/
*.d.ts
*.js.map
*.pyc
*.tsbuildinfo
scenarios/*/dist/
# transpiled transformers
jest/transformers/*.js
# node tarballs
packages/*/sentry-*.tgz

# logs
yarn-error.log
Expand Down
5 changes: 1 addition & 4 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

*

# TODO remove bundles (which in the tarball are inside `build`) in v7
!/build/**/*

!/dist/**/*
!/cjs/**/*
!/esm/**/*
!/types/**/*
Loading