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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
"koa": "^3.0.1",
"koa-bodyparser": "^4.3.0",
"koa-tree-router": "^0.12.1",
"latest-version": "^7.0.0",
"npm-run-all2": "^8.0.4",
"prettier": "^2.8.4",
"rimraf": "^5.0.5",
Expand Down
7 changes: 5 additions & 2 deletions scripts/update-sdk-versions.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import latestVersion from 'latest-version';
import { spawnSync } from 'child_process';
import { readFileSync, writeFileSync } from 'fs';
import { join } from 'path';
import { fileURLToPath } from 'url';

const __dirname = fileURLToPath(new URL('.', import.meta.url));

const latest = await latestVersion('@sentry/core');
const response = await fetch('https://registry.npmjs.org/@sentry/core/latest');
const data = await response.json();
const latest = data.version;

const packageJsonPath = join(__dirname, '..', 'package.json');
const packageJson = JSON.parse(readFileSync(packageJsonPath, { encoding: 'utf8' }));
const current = packageJson.dependencies['@sentry/core'];
Expand Down Expand Up @@ -41,3 +43,4 @@ if (current !== latest) {
// Update parameter that has the version in it
spawnSync('yarn', ['build'], { stdio: 'inherit' });
}

Loading
Loading