Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/node-fetch-2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-zimerman authored Nov 25, 2024
2 parents ac57924 + 651d1d2 commit 8868152
Show file tree
Hide file tree
Showing 33 changed files with 4,434 additions and 3,265 deletions.
19 changes: 15 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = {
ecmaVersion: 2018,
},
extends: ['@sentry-internal/sdk'],
ignorePatterns: ['build/**', 'dist/**', 'esm/**', 'examples/**', 'scripts/**', 'src/js/Ionic/**', '__tests__/**'],
plugins: ['@sentry-internal/sdk'],
ignorePatterns: ['build/**', 'dist/**', 'esm/**', 'sample/**', 'scripts/**', 'src/js/Ionic/**', '__tests__/**'],
overrides: [
{
files: ['*.ts', '*.tsx', '*.d.ts'],
Expand All @@ -22,10 +23,20 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description',
},
],
},
},
],
rules: {
'@sentry-internal/sdk/no-async-await': 'off',
'@sentry-internal/sdk/no-optional-chaining': 'off',
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
'@sentry-internal/sdk/no-class-field-initializers': 'off',
'@sentry-internal/sdk/no-unsupported-es6-methods' : 'off',
}
};
69 changes: 37 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@ jobs:
timeout-minutes: 15
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
# 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
with:
node-version: 18 # Specify the Node.js version explicitly
- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "hash=${{ hashFiles('yarn.lock') }}" >> "$GITHUB_OUTPUT"
run: echo "hash=${{ hashFiles('./yarn.lock') }}" >> "$GITHUB_OUTPUT"
- name: Check dependency cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit == ''
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: yarn install
outputs:
dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }}
Expand All @@ -53,16 +55,18 @@ jobs:
runs-on: macos-latest
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Check dependency cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Check build cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
with:
path: ${{ env.CACHED_BUILD_PATHS }}
key: ${{ env.BUILD_CACHE_KEY }}
Expand All @@ -76,16 +80,18 @@ jobs:
timeout-minutes: 15
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Check dependency cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
- name: Check build cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
id: cache_built_packages
with:
path: ${{ env.CACHED_BUILD_PATHS }}
Expand All @@ -95,11 +101,10 @@ jobs:
# packages, and so `yarn build` should always run. This `if` check is therefore only there for testing CI issues
# where the built packages are beside the point. In that case, you can change `BUILD_CACHE_KEY` (at the top of
# this file) to a constant and skip rebuilding all of the packages each time CI runs.
if: steps.cache_built_packages.outputs.cache-hit == ''
if: steps.cache_built_packages.outputs.cache-hit != 'true'
run: yarn build
# yarn.lock cannot be dirty when releasing a new version.
- name: Check if yarn.lock is dirty
if: steps.cache_built_packages.outputs.cache-hit == ''
if: steps.cache_built_packages.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

outputs:
Expand All @@ -109,22 +114,22 @@ jobs:

job_carthage_build:
name: Build Carthage Dependencies
runs-on: macos-latest
runs-on: macos-15
timeout-minutes: 30
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check Carthage build cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
id: cache_built_carthage
with:
path: ${{ env.CACHED_CARTHAGE_PATHS }}
key: ${{ hashFiles('src/ios/Cartfile') }}
- name: Install Carthage
if: steps.cache_built_carthage.outputs.cache-hit == ''
if: steps.cache_built_carthage.outputs.cache-hit != 'true'
run: brew install carthage
- name: Build Cocoa SDK from Carthage
if: steps.cache_built_carthage.outputs.cache-hit == ''
if: steps.cache_built_carthage.outputs.cache-hit != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
run: make build
Expand All @@ -135,21 +140,23 @@ jobs:
runs-on: macos-latest
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Check dependency cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Check build cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
with:
path: ${{ env.CACHED_BUILD_PATHS }}
key: ${{ env.BUILD_CACHE_KEY }}
- name: Check Carthage build cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
with:
path: ${{ env.CACHED_CARTHAGE_PATHS }}
key: ${{ hashFiles('src/ios/Cartfile') }}
Expand All @@ -158,7 +165,7 @@ jobs:
- name: Pack
run: yarn pack
- name: Archive artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
path: |
Expand All @@ -173,10 +180,9 @@ jobs:
shell: pwsh
steps:
- name: Checkout
uses: actions/checkout@v3

uses: actions/checkout@v4
- name: Download test app artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}
path: |
Expand All @@ -186,11 +192,10 @@ jobs:
cd ${{ github.workspace }}/artifact
$bundleName = (Get-Item *.tgz).Name
tar -xvzf "$bundleName"
- name: Check if package contains any Symlink
run: |
$symLinks = (find "${{ github.workspace }}" -type l -ls)
if ($null -ne $symLinks) {
Write-Error "Atfifact contains illegal SymLinks`n$symLinks"
Write-Error "Artifact contains illegal Symlinks`n$symLinks"
}
Write-Output "No Symbolic Links found, all good :)"
2 changes: 1 addition & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: npx danger ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: 'Release a new version'
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@ package-lock.json

# Generated Lockfiles
Cartfile.resolved

# Yarn cache
.yarn

# Yalc
sample/yalc.lock
64 changes: 62 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,75 @@
# Changelog

## 1.4.1

### Dependencies

- Bump `sentry-wizard` to 3.34.2 ([#356](https://github.com/getsentry/sentry-cordova/pull/356))
- build(ios): Bump `sentry-cocoa` to 8.40.1 ([#360](https://github.com/getsentry/sentry-cordova/pull/352))
- [changelog](https://github.com/getsentry/sentry-cocoa/releases/tag/8.40.1)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.36.1...8.40.1)
- Bump Android SDK from v7.14.0 to v7.17.0 ([#359](https://github.com/getsentry/sentry-cordova/pull/359))
- [changelog](https://github.com/getsentry/sentry-java/blob/7.17.0/CHANGELOG.md)
- [diff](https://github.com/getsentry/sentry-java/compare/7.14.0...7.17.0)

## 1.4.0

### Features

- Sentry Replay Support ([#354](https://github.com/getsentry/sentry-cordova/pull/354))

How to use:

Replay, profiling and performance monitoring are bundled into Sentry Cordova, all you need to do is to initialise the SDK, include the desired feature and use the sampling filters:

```javascript
/***
* @type {import("sentry-cordova")}
*/
var Sentry = cordova.require("sentry-cordova.Sentry");
Sentry.init({
dsn: YOUR_DSN,
integrations: [
// Replay integration.
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
// Tracing integration.
Sentry.browserTracingIntegration(),
],
// Replay sampling filters.
replaysSessionSampleRate: 1,
replaysOnErrorSampleRate: 1,

// Tracing sampling filter.
tracesSampleRate: 1,
});
```

### Dependencies

- Bump Sentry JavaScript SDK to `7.119.1` ([#354](https://github.com/getsentry/sentry-cordova/pull/354))
- [changelog](https://github.com/getsentry/sentry-javascript/releases/tag/7.119.1)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.34.0...7.119.1)
- Bump `sentry-wizard` to 3.32.0 ([#354](https://github.com/getsentry/sentry-cordova/pull/354))
- Bump Android SDK from v7.6.0 to v7.14.0 ([#353](https://github.com/getsentry/sentry-cordova/pull/353))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7140)
- [diff](https://github.com/getsentry/sentry-java/compare/7.6.0...7.14.0)
- build(ios): Bump `sentry-cocoa` to 8.36.0 ([#352](https://github.com/getsentry/sentry-cordova/pull/352))
- [changelog](https://github.com/getsentry/sentry-cocoa/releases/tag/8.36.0)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.21.0...8.36.0)

## 1.3.0

### Features

- Add options for iOS: enableAppHangTracking and appHangTimeoutInterval, allowing users to define the App hang timeout or completly disabling it. ([#338](https://github.com/getsentry/sentry-cordova/pull/338))
- Add options for iOS: enableAppHangTracking and appHangTimeoutInterval, allowing users to define the App hang timeout or completly disabling it. ([#338](https://github.com/getsentry/sentry-cordova/pull/338))s

### Dependencies

- Bump `sentry-wizard` to 3.21.0 ([#544](https://github.com/getsentry/sentry-wizard/pull/544))
- Bump Android SDK from v6.11.0 to v7.6.0 ([#336](https://github.com/getsentry/sentry-capacitor/pull/336))
- Bump Android SDK from v6.11.0 to v7.6.0 ([#336](https://github.com/getsentry/sentry-cordova/pull/336))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#760)
- [diff](https://github.com/getsentry/sentry-java/compare/6.11.0...7.6.0)
- build(ios): Bump `sentry-cocoa` to 8.21.0 ([#337](https://github.com/getsentry/sentry-cordova/pull/337))
Expand Down
4 changes: 2 additions & 2 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function checkDocs() {

function getCleanTitleWithPrLink() {
const title = danger.github.pr.title;
return title.split(": ").slice(-1)[0].trim().replace(/\.+$/, "") + ` ` + PR_LINK;
return `${title.split(": ").slice(-1)[0].trim().replace(/\.+$/, "")} ${PR_LINK}`;
}

function getChangelogDetailsHtml() {
Expand All @@ -41,7 +41,7 @@ async function checkChangelog() {

// Check if skipped
const skipChangelog =
danger.github && (danger.github.pr.body + "").toLowerCase().includes("#skip-changelog");
danger.github && (`${danger.github.pr.body}`).toLowerCase().includes("#skip-changelog");

if (skipChangelog) {
return;
Expand Down
Loading

0 comments on commit 8868152

Please sign in to comment.