chore(cli): change warning message to yellow

This commit is contained in:
LongYinan 2023-12-16 16:55:11 +08:00
parent 5f7e170697
commit c3eeba1e34
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -150,14 +150,18 @@ export async function readNapiConfig(
// compatible with old config
if (userNapiConfig?.name) {
console.warn(
yellow(
`[DEPRECATED] napi.name is deprecated, use napi.binaryName instead.`,
),
)
napiConfig.binaryName = userNapiConfig.name
}
if (!targets.length) {
let deprecatedWarned = false
const warning = `[DEPRECATED] napi.triples is deprecated, use napi.targets instead.`
const warning = yellow(
`[DEPRECATED] napi.triples is deprecated, use napi.targets instead.`,
)
if (userNapiConfig.triples?.defaults) {
deprecatedWarned = true
console.warn(warning)