* Output every file reset
* Add --dry-run and --reason options to reset-translated-file.js
* Output reason when reset-translated-file.js script is called
* Add script to report reset files
* Has the workflow report the reset files
* Fix script name
* Filter report by language
* Update .github/workflows/create-translation-batch-pr.yml
* Use build in array methods
* Fix error
* Attempt to fix that error
* Remove debugging code
* fix: Update path of lint-translation script
* fix: Update conditional guard clause
The conditional compared an array to a string using strict equality, so
it was never going to be true. This change makes sure we return early
when there are no changes.
* fix: Exit early when there are no files to lint
* refactor: Filter files to reset in plain javascript
As opposed to doing it in bash.
* Update tests/linting/lint-files.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* Update tests/linting/lint-files.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* Update script/i18n/lint-translation-files.js
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
* fix: update lint-translation script to point to the correct test
This change reflects its new home in `test/linting/lint-files.js` as committed in f0d17c300d on April 28, 2021.
* test: check release notes can be parsed a single YAML document
* test: check yaml content parsability
* test: check parsability for all YAML content
* refactor: move annotations to lint yaml content suite
* fix: revert file contents
* fix: remove local test script
* refactor: lowercase yaml file type
* fix: remove null assignment to stay consistent with other variables
* refactor: update reference name to caught error
* fix: remove the royal we from annotation
* refactor: update annotation for improved readability
* fix: add missing preposition
* fix: make script for linting translations executable
* fix: execute the command directly
* feat: surface any errors if lint check fails
* fix: do not return early if lint check errors
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
* feat: stub two reset scripts
* refactor: split lint script into two separate files
* fix: revert back to original lint script
* refactor: use commander interface for linting translation files
* Skip reset attempt when violation list is empty
So that "execSync(`cat ${log}...`)" in line 64 is never executed. When
there are no errors, the log file is not created, and unless it had been
previously created by another process, the script will error out.
Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
* fix: de-duplicate and filter non-existent broken files
* fix: sequentially reset known broken translation files
When a known broken translation is reset, a Git operation performs the
underlying reset. If more than one Git operation is running at a time,
Git will throw an error:
> Another git process seems to be running in this repository [...]
This change ensures that we reset each broken translation file
sequentially to not run into this error.
* Skip reset of a file that does not exist
Co-authored-by: Marcelo Jacobus <marcelo.jacobus@gmail.com>
* First run of script
* Get the app running --- ish
* Get NextJS working
* Remove `node:`
* Get more tests passing in unit directory
* Update FailBot test to use nock
* Update test.yml
* Update Dockerfile
* tests/content fixes
* Update page.js
* Update build-changelog.js
* updating tests/routing
* Update orphan-tests.js
* updating tests/rendering
* Update .eslintrc.js
* Update .eslintrc.js
* Install jest/globals
* "linting" tests
* staging update to server.mjs
* Change '.github/allowed-actions.js' to a ESM export
* Lint
* Fixes for the main package.json
* Move Jest to be last in the npm test command so we can pass args
* Just use 'npm run lint' in the npm test command
* update algolia label script
* update openapi script
* update require on openapi
* Update enterprise-algolia-label.js
* forgot JSON.parse
* Update lunr-search-index.js
* Always explicitly include process.cwd() for JSON file reads pathed from project root
* update graphql/update-files.js script
* Update other npm scripts using jest to pass ESM NODE_OPTIONS
* Update check-for-enterprise-issues-by-label.js for ESM
* Update create-enterprise-issue.js for ESM
* Import jest global for browser tests
* Convert 'script/deploy' to ESM
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: James M. Greene <jamesmgreene@github.com>
* Update homogenize-frontmatter script to not stop on errors and concurrency yes
* Update homogenize-frontmatter.js
* Speed up by avoiding exists check
Node docs: Using fs.exists() to check for the existence of a file before calling fs.open(), fs.readFile() or fs.writeFile() is not recommended. Doing so introduces a race condition, since other processes may change the file's state between the two calls. Instead, user code should open/read/write the file directly and handle the error raised if the file does not exist.
* Update homogenize-frontmatter.js
Co-authored-by: Zeke Sikelianos <zeke@github.com>