Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.1.0 #262

Merged
merged 46 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
fc6fe9e
NPM(deps): Bump @wordpress/element from 5.22.0 to 5.24.0
dependabot[bot] Nov 30, 2023
5751e3d
NPM Dev(deps-dev): Bump @wordpress/env from 8.11.0 to 8.13.0
dependabot[bot] Dec 1, 2023
28e96c1
Merge pull request #193 from newfold-labs/dependabot/npm_and_yarn/dev…
wpscholar Dec 5, 2023
982db37
NPM Dev(deps-dev): Bump cypress from 13.5.0 to 13.6.1
dependabot[bot] Dec 6, 2023
1ac318a
Composer Dev(deps-dev): Bump wp-phpunit/wp-phpunit from 6.3.1 to 6.4.2
dependabot[bot] Dec 7, 2023
76f4392
Merge pull request #202 from newfold-labs/dependabot/composer/develop…
wpscholar Dec 11, 2023
212c0a1
Composer(deps): Bump newfold-labs/wp-module-data from 2.4.11 to 2.4.14
dependabot[bot] Dec 11, 2023
6b3dfbf
Merge pull request #201 from newfold-labs/dependabot/npm_and_yarn/dev…
wpscholar Dec 11, 2023
b452306
NPM Dev(deps-dev): Bump @wordpress/scripts from 26.16.0 to 26.18.0
dependabot[bot] Dec 11, 2023
db00ef8
Merge pull request #198 from newfold-labs/dependabot/composer/develop…
wpscholar Dec 11, 2023
86bf725
Merge pull request #192 from newfold-labs/dependabot/npm_and_yarn/dev…
wpscholar Dec 11, 2023
12fca32
Merge pull request #191 from newfold-labs/dependabot/npm_and_yarn/dev…
wpscholar Dec 11, 2023
289522a
NPM(deps): Bump @wordpress/compose from 6.22.0 to 6.24.0
dependabot[bot] Dec 11, 2023
5aa66f5
Composer Dev(deps-dev): Bump wp-cli/i18n-command from 2.4.4 to 2.5.0
dependabot[bot] Dec 12, 2023
25accf4
NPM(deps): Bump @wordpress/icons from 9.36.0 to 9.38.0
dependabot[bot] Dec 12, 2023
e532cd3
NPM(deps): Bump react-use from 17.4.0 to 17.4.2
dependabot[bot] Dec 12, 2023
95d1feb
Merge pull request #205 from newfold-labs/dependabot/npm_and_yarn/dev…
circlecube Dec 12, 2023
efe35df
Merge pull request #203 from newfold-labs/dependabot/composer/develop…
circlecube Dec 12, 2023
b566796
Merge pull request #197 from newfold-labs/dependabot/npm_and_yarn/dev…
circlecube Dec 12, 2023
082fb41
Composer(deps): Bump newfold-labs/wp-module-deactivation
dependabot[bot] Dec 12, 2023
b0b9504
Merge pull request #190 from newfold-labs/dependabot/composer/develop…
circlecube Dec 12, 2023
ad34308
NPM(deps): Bump react-router-dom from 6.18.0 to 6.20.1
dependabot[bot] Dec 12, 2023
f90c269
Merge pull request #204 from newfold-labs/dependabot/npm_and_yarn/dev…
circlecube Dec 12, 2023
8f15d22
Merge pull request #206 from newfold-labs/dependabot/npm_and_yarn/dev…
circlecube Dec 12, 2023
4f3db2b
GitHub Actions(deps): Bump actions/upload-artifact from 3 to 4
dependabot[bot] Dec 15, 2023
233c988
GitHub Actions(deps): Bump actions/cache from 3 to 4
dependabot[bot] Jan 18, 2024
3633c17
Merge branch 'main' into develop
circlecube Feb 8, 2024
f6e5c04
Replace references to old values in `NewfoldRuntime`
manikantakailasa Jul 1, 2024
f0c9ffd
Merge pull request #254 from manikantakailasa/PRESS0-1197
circlecube Jul 2, 2024
d300992
Merge pull request #226 from newfold-labs/dependabot/github_actions/d…
circlecube Jul 2, 2024
5aa5a4c
Merge pull request #214 from newfold-labs/dependabot/github_actions/d…
circlecube Jul 2, 2024
6f01aa5
update plugin and wp tested version
circlecube Jul 2, 2024
f8229f6
update composer packages and scripts
circlecube Jul 2, 2024
077c305
update npm packages and versions
circlecube Jul 2, 2024
18b00b6
update wp and node version in workflows
circlecube Jul 2, 2024
fe3793c
add features to bootstrap
circlecube Jul 2, 2024
ada5bf3
app updates
circlecube Jul 3, 2024
1f6de8c
WordPress I18N triggered by commit ada5bf3b8292afb408de68e2e7821e9a74…
circlecube Jul 3, 2024
d0a2479
lint fixes
circlecube Jul 3, 2024
5cc8f46
Merge branch 'release/2.1.0' of https://github.com/newfold-labs/wp-pl…
circlecube Jul 3, 2024
da439ed
fix i18n script and workflow to work together
circlecube Jul 3, 2024
13937b4
last lint fix
circlecube Jul 3, 2024
6e77606
update modules with classNames fixes
circlecube Jul 3, 2024
fbc51e6
remove unused plugin components
circlecube Jul 3, 2024
57b1f18
use component library Title in place of outdated Heading component
circlecube Jul 3, 2024
b3f0986
fix error in older php versions
circlecube Jul 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
- '8.1'
- '8.2'
wpVersion:
- '6.2'
- '6.3'
- '6.4'
- '6.5'

steps:

Expand All @@ -55,18 +55,18 @@ jobs:
echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT
echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT

- name: Use Node.js 16.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: 'npm'

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:

- name: Store screenshots of test failures
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./tests/cypress/screenshots
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cypress-tests-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ jobs:
mkdir dist
echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT
echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT
- name: Use Node.js 16.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: 'npm'

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:

- name: Store screenshots of test failures
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./tests/cypress/screenshots
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ jobs:
echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT
echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT

- name: Use Node.js 16.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x

- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -70,7 +70,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:

- name: Store screenshots of test failures
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./tests/cypress/screenshots
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
if: "!! env.GIT_DIFF"

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/upload-artifact-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ jobs:
echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT
echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT

- name: Use Node.js 16.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x

- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -64,7 +64,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
working-directory: ${{ steps.workflow.outputs.DIST }}
run: find .

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.workflow.outputs.PACKAGE }}
path: ${{ steps.workflow.outputs.DIST }}
8 changes: 4 additions & 4 deletions .github/workflows/upload-asset-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ jobs:
echo "DIST=${PWD}/dist" >> $GITHUB_OUTPUT
echo "PACKAGE=${REPO##*/}" >> $GITHUB_OUTPUT

- name: Set Node.js 16.x
- name: Set Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x

- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -76,7 +76,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
33 changes: 26 additions & 7 deletions .github/workflows/wp-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ jobs:
with:
php-version: '8.1'
coverage: none
tools: composer
tools: composer, cs2pr

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

- name: Setup Node
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.x

- name: Log debug information
run: |
Expand All @@ -64,25 +64,44 @@ jobs:
- name: Install PHP Dependencies
run: composer install --no-progress --optimize-autoloader

- name: Setup Registry
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc

- name: NPM Install
run: npm install --legacy-peer-deps

- name: Build JavaScript
run: npm run build

- name: Remove token
run: git checkout -- '.npmrc'


- name: Add text domains
run: npx node-wp-i18n addtextdomain

- name: Generate POT file
run: vendor/bin/wp i18n make-pot . ./languages/${{ github.event.repository.name }}.pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/${{ github.repository }}/issues","POT-Creation-Date":null}' --exclude=assets,storybook,tests
- name: Generate language files
run: composer run-script i18n

- name: Check if there are file changes
id: changes
continue-on-error: true
run: git diff --exit-code

- name: Warning if language files have changes
if: steps.changes.outcome == 'failure'
run: |
echo "i18n files are out of date"
echo "Please run command (composer run i18n) locally to update them and commit before releasing"

- name: Commit web files
if: steps.changes.outcome == 'failure'
run: |
git config --local user.name "${{ github.event.head_commit.author.name }}"
git config --local user.email "${{ github.event.head_commit.author.email }}"
git remote -v
git add -A
git commit -m "WordPress I18N triggered by commit ${{ github.sha }}"
git commit -m "WordPress i18n triggered by commit ${{ github.sha }}"
git status

- name: Push changes
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v20
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#tags/6.4.1",
"core": "WordPress/WordPress#tags/6.5.5",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
Expand Down
22 changes: 13 additions & 9 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use WP_Forge\UpgradeHandler\UpgradeHandler;
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\ModuleLoader\Plugin;
use NewfoldLabs\WP\Module\Features\Features;

use function NewfoldLabs\WP\ModuleLoader\container as setContainer;

// Composer autoloader
Expand All @@ -36,7 +38,7 @@
$web_module_container->set(
'plugin',
$web_module_container->service(
function() {
function () {
return new Plugin(
array(
'id' => 'web',
Expand Down Expand Up @@ -99,16 +101,16 @@ function() {
)
);
$pluginUpdater->setDataOverrides(
[
'banners' => [
array(
'banners' => array(
'2x' => 'https://cdn.hiive.space/marketplace/vendors-assets/web-banner.svg',
'1x' => 'https://cdn.hiive.space/marketplace/vendors-assets/web-banner.svg',
],
'icons' => [
),
'icons' => array(
'2x' => 'https://cdn.hiive.space/marketplace/vendors-assets/web-icon.svg',
'1x' => 'https://cdn.hiive.space/marketplace/vendors-assets/web-icon.svg',
],
]
),
)
);

// Handle any upgrade routines (only in the admin)
Expand Down Expand Up @@ -149,6 +151,8 @@ function() {

AdminBar::init();

// Instantiate the Features singleton
Features::getInstance();

/**
* Filter to add applicable BN code to paypal requests
Expand Down Expand Up @@ -187,7 +191,7 @@ function ( $tag, $handle, $source ) {
$replacement = ' data-partner-attribution-id="Yith_PCP"';
if ( stripos( $tag, 'partner-attribution-id' ) === false ) {
$tag = str_replace( ' src=', $replacement . ' src=', $tag );
} else if ( stripos( $tag, 'NEWFOLD' ) || stripos( $tag, 'YITH' ) ) {
} elseif ( stripos( $tag, 'NEWFOLD' ) || stripos( $tag, 'YITH' ) ) {
$tag = preg_replace( '/ data-partner-attribution-id="(.*?)"/', $replacement, $tag );
}
}
Expand All @@ -196,4 +200,4 @@ function ( $tag, $handle, $source ) {
25,
3
);
}
}
Loading
Loading