Skip to content

Commit 6ba79c3

Browse files
authored
chore(deps): Upgrade latest-version to v9.0.0 (which is ESM only) (#60)
1 parent 545b9bf commit 6ba79c3

File tree

4 files changed

+78
-227
lines changed

4 files changed

+78
-227
lines changed

.github/renovate.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"decamelize",
2222
"execa",
2323
"humanize-string",
24-
"latest-version",
2524
"pascalcase",
2625
"pretty-bytes",
2726
"pretty-ms",

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"fs-extra": "11.2.0",
6666
"humanize-string": "2.1.0",
6767
"jscodeshift": "17.0.0",
68-
"latest-version": "5.1.0",
68+
"latest-version": "9.0.0",
6969
"listr2": "7.0.2",
7070
"lodash": "4.17.21",
7171
"pascalcase": "1.0.0",

packages/cli/src/lib/updateCheck.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export const SHOW_LOCK_IDENTIFIER = 'UPDATE_CHECK_SHOW'
5353
export const EXCLUDED_COMMANDS = ['upgrade', 'ts-to-js']
5454

5555
/**
56-
* @const {string} Filepath of the file which persists update check data within the .redwood directory
56+
* @const {string} Filepath of the file which persists update check data within
57+
* the .redwood directory
5758
*/
5859
let persistenceDirectory
5960

@@ -68,13 +69,14 @@ function getPersistenceDirectory() {
6869
}
6970

7071
/**
71-
* Performs an update check to detect if a newer version of redwood is available and records the result to a file within .redwood for persistence
72+
* Performs an update check to detect if a newer version of Redmix is available
73+
* and records the result to a file within .redwood for persistence
7274
*/
7375
export async function check() {
7476
try {
7577
console.time('Update Check')
7678

77-
// Read package.json and extract the @redwood/core version
79+
// Read package.json and extract the @redmix/core version
7880
const packageJson = JSON.parse(
7981
fs.readFileSync(path.join(getPaths().base, 'package.json')),
8082
)
@@ -84,7 +86,7 @@ export async function check() {
8486
while (!/\d/.test(localVersion.charAt(0))) {
8587
localVersion = localVersion.substring(1)
8688
}
87-
console.log(`Detected the current version of RedwoodJS: '${localVersion}'`)
89+
console.log(`Detected the current version of Redmix: '${localVersion}'`)
8890

8991
const remoteVersions = new Map()
9092
for (const tag of getConfig().notifications.versionUpdates) {
@@ -100,7 +102,7 @@ export async function check() {
100102
console.error(error)
101103
}
102104
}
103-
console.log(`Detected the latest versions of RedwoodJS as:`)
105+
console.log(`Detected the latest versions of Redmix as:`)
104106
console.log(JSON.stringify([...remoteVersions.entries()], undefined, 2))
105107

106108
// Save the latest update information
@@ -117,7 +119,8 @@ export async function check() {
117119
}
118120

119121
/**
120-
* Determines if background checks are enabled. Checks are enabled within the redwood.toml notifications config.
122+
* Determines if background checks are enabled. Checks are enabled within the
123+
* redwood.toml notifications config.
121124
*/
122125
export function isEnabled() {
123126
return getConfig().notifications.versionUpdates.length > 0
@@ -180,7 +183,7 @@ function getUpdateMessage() {
180183

181184
let updateCount = 0
182185
let message =
183-
' New updates to Redwood are available via `yarn rw upgrade#REPLACEME#` '
186+
' New updates to Redmix are available via `yarn rw upgrade#REPLACEME#` '
184187
data.remoteVersions.forEach((version, tag) => {
185188
if (semver.gt(version, data.localVersion)) {
186189
updateCount += 1
@@ -201,7 +204,7 @@ function getUpdateMessage() {
201204
return boxen(message, {
202205
padding: 0,
203206
margin: 1,
204-
title: `Redwood Update${updateCount > 1 ? 's ' : ' '}available 🎉`,
207+
title: `Redmix Update${updateCount > 1 ? 's ' : ' '}available 🎉`,
205208
borderColor: '#0b8379', // The RedwoodJS colour
206209
borderStyle: 'round',
207210
})

0 commit comments

Comments
 (0)