Skip to content

Commit

Permalink
changed browserSdkVersion export name
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanGaignault committed Feb 15, 2024
1 parent 81855d3 commit bf1e3dd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions scripts/export-bundles-sizes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs')
const path = require('path')
const { BrowserSdkVersion } = require('./lib/browser-sdk-version')
const { browserSdkVersion } = require('./lib/browser-sdk-version')
const { getOrg2ApiKey } = require('./lib/secrets')
const { runMain, fetch } = require('./lib/execution-utils')

Expand Down Expand Up @@ -28,7 +28,7 @@ runMain(async () => {
rum_slim: getBundleSize(rumSlimPath),
worker: getBundleSize(workerPath),
},
version: BrowserSdkVersion,
version: browserSdkVersion,
commit: process.env.CI_COMMIT_SHORT_SHA,
branch: process.env.CI_COMMIT_REF_NAME,
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/browser-sdk-version.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const lernaJson = require('../../lerna.json')

module.exports = {
BrowserSdkVersion: lernaJson.version,
browserSdkVersion: lernaJson.version,
}
6 changes: 3 additions & 3 deletions scripts/lib/build-env.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { readFileSync } = require('fs')
const path = require('path')
const execSync = require('child_process').execSync
const { BrowserSdkVersion } = require('./browser-sdk-version')
const { browserSdkVersion } = require('./browser-sdk-version')
const { command } = require('./command')

/**
Expand All @@ -24,12 +24,12 @@ const buildEnvFactories = {
SDK_VERSION: () => {
switch (getBuildMode()) {
case 'release':
return BrowserSdkVersion
return browserSdkVersion
case 'canary': {
const commitSha1 = execSync('git rev-parse HEAD').toString().trim()
// TODO when tags would allow '+' characters
// use build separator (+) instead of prerelease separator (-)
return `${BrowserSdkVersion}-${commitSha1}`
return `${browserSdkVersion}-${commitSha1}`
}
default:
return 'dev'
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/generate-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const readFile = util.promisify(require('fs').readFile)

const emojiNameMap = require('emoji-name-map')

const { BrowserSdkVersion } = require('../lib/browser-sdk-version')
const { browserSdkVersion } = require('../lib/browser-sdk-version')
const { spawnCommand, printError, runMain } = require('../lib/execution-utils')
const { command } = require('../lib/command')
const { modifyFile } = require('../lib/files-utils')
Expand Down Expand Up @@ -33,7 +33,7 @@ ${emojisLegend}
---
## v${BrowserSdkVersion}
## v${browserSdkVersion}
${changesList}
${content.slice(content.indexOf('\n##'))}`
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/update-peer-dependency-versions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { runMain } = require('../lib/execution-utils')
const { modifyFile } = require('../lib/files-utils')
const { command } = require('../lib/command')
const { BrowserSdkVersion } = require('../lib/browser-sdk-version')
const { browserSdkVersion } = require('../lib/browser-sdk-version')

const JSON_FILES = ['rum', 'rum-slim', 'logs'].map((packageName) => `./packages/${packageName}/package.json`)

Expand All @@ -25,7 +25,7 @@ runMain(async () => {
function updateJsonPeerDependencies(content) {
const json = JSON.parse(content)
Object.keys(json.peerDependencies).forEach((key) => {
json.peerDependencies[key] = BrowserSdkVersion
json.peerDependencies[key] = browserSdkVersion
})
return `${JSON.stringify(json, null, 2)}\n`
}

0 comments on commit bf1e3dd

Please sign in to comment.