Skip to content

Commit

Permalink
Merge branch 'trunk' into rnmobile/upgrade/0.69.4
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	packages/element/package.json
  • Loading branch information
Gerardo committed Sep 21, 2022
2 parents 873dfa4 + 201189e commit 9a2f4f2
Show file tree
Hide file tree
Showing 1,563 changed files with 38,941 additions and 21,074 deletions.
15 changes: 13 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
const { escapeRegExp } = require( 'lodash' );
const glob = require( 'glob' ).sync;
const { join } = require( 'path' );

Expand All @@ -17,7 +16,8 @@ const { version } = require( './package' );
* @type {string}
*/
const majorMinorRegExp =
escapeRegExp( version.replace( /\.\d+$/, '' ) ) + '(\\.\\d+)?';
version.replace( /\.\d+$/, '' ).replace( /[\\^$.*+?()[\]{}|]/g, '\\$&' ) +
'(\\.\\d+)?';

/**
* The list of patterns matching files used only for development purposes.
Expand Down Expand Up @@ -83,9 +83,11 @@ module.exports = {
'capitalize',
'chunk',
'clamp',
'cloneDeep',
'compact',
'concat',
'countBy',
'debounce',
'deburr',
'defaults',
'defaultTo',
Expand All @@ -94,14 +96,19 @@ module.exports = {
'differenceWith',
'dropRight',
'each',
'escapeRegExp',
'extend',
'findIndex',
'findKey',
'findLast',
'first',
'flatMap',
'flatten',
'flattenDeep',
'flowRight',
'forEach',
'fromPairs',
'has',
'identity',
'invoke',
'isArray',
Expand All @@ -118,6 +125,7 @@ module.exports = {
'isUndefined',
'keyBy',
'keys',
'last',
'lowerCase',
'mapKeys',
'maxBy',
Expand All @@ -127,13 +135,15 @@ module.exports = {
'nth',
'once',
'overEvery',
'partial',
'partialRight',
'random',
'reject',
'repeat',
'reverse',
'size',
'snakeCase',
'sortBy',
'startCase',
'startsWith',
'stubFalse',
Expand All @@ -145,6 +155,7 @@ module.exports = {
'toString',
'trim',
'truncate',
'unionBy',
'uniq',
'uniqBy',
'uniqueId',
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/stale-issue-flaky-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Mark old flaky tests issues as stale'
on:
schedule:
- cron: '20 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}

steps:
- uses: actions/stale@996798eb71ef485dc4c7b4d3285842d714040c4a # v3.0.17
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has gone 30 days without any activity.'
days-before-stale: 30
days-before-close: 1
only-labels: '[Type] Flaky Test'
stale-issue-label: '[Status] Stale'
1 change: 1 addition & 0 deletions .github/workflows/stale-issue-mark-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/stale@996798eb71ef485dc4c7b4d3285842d714040c4a # v3.0.17
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "Hi,\nThis issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.\nThanks for helping out."
days-before-stale: 30
days-before-close: -1
only-labels: 'Needs Testing'
Expand Down
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
build
build-style
node_modules
packages/stylelint-config/test
2 changes: 1 addition & 1 deletion bin/api-docs/are-api-docs-unstaged.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const getUnstagedReadmes = () =>
'\n',
'Some API docs may be out of date:',
unstagedReadmes.toString(),
'Either build and stage them with npm run docs:blocks or continue with --no-verify.',
'Either build and stage them with npm run docs:build or continue with --no-verify.',
'\n'
)
);
Expand Down
17 changes: 15 additions & 2 deletions bin/plugin/commands/changelog.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
const { groupBy, escapeRegExp, flow, sortBy } = require( 'lodash' );
const { groupBy, flow } = require( 'lodash' );
const Octokit = require( '@octokit/rest' );
const { sprintf } = require( 'sprintf-js' );
const semver = require( 'semver' );
Expand Down Expand Up @@ -185,6 +185,17 @@ const REWORD_TERMS = {
docs: 'documentation',
};

/**
* Escapes the RegExp special characters.
*
* @param {string} string Input string.
*
* @return {string} Regex-escaped string.
*/
function escapeRegExp( string ) {
return string.replace( /[\\^$.*+?()[\]{}|]/g, '\\$&' );
}

/**
* Returns candidates based on whether the given labels
* are part of the allowed list.
Expand Down Expand Up @@ -823,7 +834,9 @@ function getContributorPropsMarkdownList( ftcPRs ) {
* @return {IssuesListForRepoResponseItem[]} The sorted list of pull requests.
*/
function sortByUsername( items ) {
return sortBy( items, ( item ) => item.user.login.toLowerCase() );
return [ ...items ].sort( ( a, b ) =>
a.user.login.toLowerCase().localeCompare( b.user.login.toLowerCase() )
);
}

/**
Expand Down
Loading

0 comments on commit 9a2f4f2

Please sign in to comment.