Skip to content

Commit

Permalink
prep build 01/06
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Jan 6, 2024
2 parents 5b18529 + ffbc300 commit 687f751
Show file tree
Hide file tree
Showing 66 changed files with 845 additions and 830 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,16 @@ updates:
labels:
- 'GitHub Actions'
- '[Type] Build Tooling'
groups:
github-actions:
patterns:
- '*'
exclude-patterns:
- 'actions/setup-java'
- 'gradle/*'
- 'reactivecircus/*'
react-native:
patterns:
- 'actions/setup-java'
- 'gradle/*'
- 'reactivecircus/*'
8 changes: 4 additions & 4 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: '.nvmrc'
check-latest: true
Expand Down Expand Up @@ -270,12 +270,12 @@ jobs:
run: echo "version=$(echo $VERSION | cut -d / -f 3 | sed 's/-rc./ RC/' )" >> $GITHUB_OUTPUT

- name: Download Plugin Zip Artifact
uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: gutenberg-plugin

- name: Download Release Notes Artifact
uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: release-notes

Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
git config user.email gutenberg@wordpress.org
- name: Setup Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: 'main/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: '.nvmrc'
check-latest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v4.1.0
id: download_artifact
# Don't fail the job if there isn't any flaky tests report.
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-changes-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Get changed PHP files
id: changed-files-php
uses: tj-actions/changed-files@94549999469dbfa032becf298d95c87a14c34394 # v40.2.2
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f # v41.0.1
with:
files: |
*.{php}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ jobs:
- name: Setup Node.js
if: ${{ github.event.inputs.release_type != 'wp' }}
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: 'cli/.nvmrc'
registry-url: 'https://registry.npmjs.org'
check-latest: true

- name: Setup Node.js (for WP major version)
if: ${{ github.event.inputs.release_type == 'wp' && github.event.inputs.wp_version }}
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: 'publish/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: '.nvmrc'
check-latest: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Java
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
distribution: 'corretto'
java-version: '17'
Expand All @@ -47,7 +47,7 @@ jobs:
run: npm run native test:e2e:setup

- name: Gradle cache
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1

- name: AVD cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand All @@ -60,7 +60,7 @@ jobs:

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2.28.0
uses: reactivecircus/android-emulator-runner@99a4aac18b4df9b3af66c4a1f04c1f23fa10c270 # v2.29.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
Expand All @@ -71,7 +71,7 @@ jobs:
script: echo "Generated AVD snapshot for caching."

- name: Run tests
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2.28.0
uses: reactivecircus/android-emulator-runner@99a4aac18b4df9b3af66c4a1f04c1f23fa10c270 # v2.29.0
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Use desired version of Node.js
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: '.nvmrc'
check-latest: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./trunk/readme.txt
- name: Download Changelog Artifact
uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: changelog trunk
path: trunk
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" "$VERSION/readme.txt"
- name: Download Changelog Artifact
uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4.0.0
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: changelog trunk
path: ${{ github.event.release.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { unlock } from '../../lock-unlock';
import BlockPreview from '../block-preview';
import InserterDraggableBlocks from '../inserter-draggable-blocks';
import BlockPatternsPaging from '../block-patterns-paging';
import { PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';
import { INSERTER_PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';

const {
CompositeV2: Composite,
Expand Down Expand Up @@ -78,7 +78,8 @@ function BlockPattern( {
>
<WithToolTip
showTooltip={
showTooltip && ! pattern.type !== PATTERN_TYPES.user
showTooltip &&
! pattern.type !== INSERTER_PATTERN_TYPES.user
}
title={ pattern.title }
>
Expand All @@ -97,7 +98,7 @@ function BlockPattern( {
{
'block-editor-block-patterns-list__list-item-synced':
pattern.type ===
PATTERN_TYPES.user &&
INSERTER_PATTERN_TYPES.user &&
! pattern.syncStatus,
}
) }
Expand All @@ -122,7 +123,8 @@ function BlockPattern( {
/>

<HStack className="block-editor-patterns__pattern-details">
{ pattern.type === PATTERN_TYPES.user &&
{ pattern.type ===
INSERTER_PATTERN_TYPES.user &&
! pattern.syncStatus && (
<div className="block-editor-patterns__pattern-icon-wrapper">
<Icon
Expand All @@ -132,7 +134,8 @@ function BlockPattern( {
</div>
) }
{ ( ! showTooltip ||
pattern.type === PATTERN_TYPES.user ) && (
pattern.type ===
INSERTER_PATTERN_TYPES.user ) && (
<div className="block-editor-block-patterns-list__item-title">
{ pattern.title }
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useSelect } from '@wordpress/data';
* Internal dependencies
*/
import BlockDraggableChip from '../block-draggable/draggable-chip';
import { PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';
import { INSERTER_PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';

const InserterDraggableBlocks = ( {
isEnabled,
Expand Down Expand Up @@ -42,7 +42,7 @@ const InserterDraggableBlocks = ( {
transferData={ transferData }
onDragStart={ ( event ) => {
const parsedBlocks =
pattern?.type === PATTERN_TYPES.user &&
pattern?.type === INSERTER_PATTERN_TYPES.user &&
pattern?.syncStatus !== 'unsynced'
? [ createBlock( 'core/block', { ref: pattern.id } ) ]
: blocks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { searchItems } from '../search-items';
import BlockPatternsPaging from '../../block-patterns-paging';
import usePatternsPaging from '../hooks/use-patterns-paging';
import {
PATTERN_TYPES,
INSERTER_PATTERN_TYPES,
allPatternsCategory,
myPatternsCategory,
} from '../block-patterns-tab/utils';
Expand Down Expand Up @@ -73,7 +73,7 @@ function PatternList( { searchValue, selectedCategory, patternCategories } ) {
}
if (
selectedCategory === myPatternsCategory.name &&
pattern.type === PATTERN_TYPES.user
pattern.type === INSERTER_PATTERN_TYPES.user
) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
isPatternFiltered,
allPatternsCategory,
myPatternsCategory,
PATTERN_TYPES,
INSERTER_PATTERN_TYPES,
} from './utils';

const noop = () => {};
Expand Down Expand Up @@ -73,7 +73,7 @@ export function PatternCategoryPreviews( {

if (
category.name === myPatternsCategory.name &&
pattern.type === PATTERN_TYPES.user
pattern.type === INSERTER_PATTERN_TYPES.user
) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ import { useMemo, createInterpolateElement } from '@wordpress/element';
/**
* Internal dependencies
*/
import { myPatternsCategory, SYNC_TYPES, PATTERN_TYPES } from './utils';

const getShouldDisableSyncFilter = ( sourceFilter ) =>
sourceFilter !== PATTERN_TYPES.all && sourceFilter !== PATTERN_TYPES.user;
import {
myPatternsCategory,
INSERTER_SYNC_TYPES,
INSERTER_PATTERN_TYPES,
} from './utils';

const getShouldDisableSyncFilter = ( sourceFilter ) => sourceFilter !== 'all';
const getShouldDisableNonUserSources = ( category ) => {
return category.name === myPatternsCategory.name;
};
Expand All @@ -39,7 +41,7 @@ export function PatternsFilter( {
// this filter themselves.
const currentPatternSourceFilter =
category.name === myPatternsCategory.name
? PATTERN_TYPES.user
? INSERTER_PATTERN_TYPES.user
: patternSourceFilter;

// We need to disable the sync filter option if the source filter is not 'all' or 'user'
Expand All @@ -56,19 +58,19 @@ export function PatternsFilter( {
const patternSyncMenuOptions = useMemo(
() => [
{
value: SYNC_TYPES.all,
value: 'all',
label: _x( 'All', 'Option that shows all patterns' ),
},
{
value: SYNC_TYPES.full,
value: INSERTER_SYNC_TYPES.full,
label: _x(
'Synced',
'Option that shows all synchronized patterns'
),
disabled: shouldDisableSyncFilter,
},
{
value: SYNC_TYPES.unsynced,
value: INSERTER_SYNC_TYPES.unsynced,
label: _x(
'Not synced',
'Option that shows all patterns that are not synchronized'
Expand All @@ -82,22 +84,22 @@ export function PatternsFilter( {
const patternSourceMenuOptions = useMemo(
() => [
{
value: PATTERN_TYPES.all,
value: 'all',
label: __( 'All' ),
disabled: shouldDisableNonUserSources,
},
{
value: PATTERN_TYPES.directory,
value: INSERTER_PATTERN_TYPES.directory,
label: __( 'Pattern Directory' ),
disabled: shouldDisableNonUserSources,
},
{
value: PATTERN_TYPES.theme,
value: INSERTER_PATTERN_TYPES.theme,
label: __( 'Theme & Plugins' ),
disabled: shouldDisableNonUserSources,
},
{
value: PATTERN_TYPES.user,
value: INSERTER_PATTERN_TYPES.user,
label: __( 'User' ),
},
],
Expand All @@ -107,7 +109,7 @@ export function PatternsFilter( {
function handleSetSourceFilterChange( newSourceFilter ) {
setPatternSourceFilter( newSourceFilter );
if ( getShouldDisableSyncFilter( newSourceFilter ) ) {
setPatternSyncFilter( SYNC_TYPES.all );
setPatternSyncFilter( 'all' );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
isPatternFiltered,
allPatternsCategory,
myPatternsCategory,
PATTERN_TYPES,
INSERTER_PATTERN_TYPES,
} from './utils';

function hasRegisteredCategory( pattern, allCategories ) {
Expand Down Expand Up @@ -69,7 +69,7 @@ export function usePatternCategories( rootClientId, sourceFilter = 'all' ) {
}
if (
filteredPatterns.some(
( pattern ) => pattern.type === PATTERN_TYPES.user
( pattern ) => pattern.type === INSERTER_PATTERN_TYPES.user
)
) {
categories.unshift( myPatternsCategory );
Expand Down
Loading

0 comments on commit 687f751

Please sign in to comment.