-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-notification-slowness-and-crashes
- Loading branch information
Showing
83 changed files
with
628 additions
and
435 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { readChangedFiles } = require('../../test/e2e/changedFilesUtil.js'); | ||
|
||
/** | ||
* Verifies that all changed files are in the /_locales/ directory. | ||
* Fails the build if any changed files are outside of the /_locales/ directory. | ||
* Fails if no changed files are detected. | ||
*/ | ||
async function validateLocalesOnlyChangedFiles() { | ||
const changedFiles = await readChangedFiles(); | ||
if (!changedFiles || changedFiles.length === 0) { | ||
console.error('Failure: No changed files detected.'); | ||
process.exit(1); | ||
} | ||
const invalidFiles = changedFiles.filter( | ||
(file) => !file.startsWith('app/_locales/'), | ||
); | ||
if (invalidFiles.length > 0) { | ||
console.error( | ||
'Failure: Changed files must be in the /_locales/ directory.\n Changed Files:', | ||
changedFiles, | ||
'\n Invalid Files:', | ||
invalidFiles, | ||
); | ||
process.exit(1); | ||
} else { | ||
console.log('Passed validation'); | ||
process.exit(0); | ||
} | ||
} | ||
|
||
validateLocalesOnlyChangedFiles(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.