-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: undeprecate "specs" in package.json (#1290)
- Loading branch information
Showing
11 changed files
with
125 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
const chalk = require('chalk'); | ||
const log = require('../../src/utils/logger').child({ __filename }); | ||
const migrationGuideUrl = 'https://wix.to/I0DOAK0'; | ||
const migrationGuideUrl = 'https://github.com/wix/Detox/blob/master/docs/Guide.Migration.md#migrating-from-detox-120x-to-121x'; | ||
|
||
function coerceDeprecation(option) { | ||
return function coerceDeprecationFn(value) { | ||
log.warn(`Beware: ${option} will be removed in the next version of Detox.`); | ||
log.warn(`See the migration guide: ${migrationGuideUrl}`); | ||
log.warn(`See the migration guide:\n${migrationGuideUrl} `); | ||
|
||
return value; | ||
}; | ||
} | ||
|
||
function printFileDeprecationWarning(file) { | ||
log.warn('Deprecated: "file" option in "detox" section of package.json won\'t be supported in the next Detox version.\n'); | ||
console.log(` "detox": {`); | ||
console.log(chalk.red(`- "file": ${JSON.stringify(file)},`)); | ||
console.log(chalk.green(`+ "specs": ${JSON.stringify(file)},\n`)); | ||
log.warn(`Please rename it to "specs", as demonstrated above.`); | ||
} | ||
|
||
module.exports = { | ||
coerceDeprecation, | ||
migrationGuideUrl, | ||
printFileDeprecationWarning, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.