Skip to content

Commit 9fa9081

Browse files
Merge branch 'trunk' into PRESS10-97
2 parents e2ff3d9 + 735fc41 commit 9fa9081

File tree

773 files changed

+44787
-101140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

773 files changed

+44787
-101140
lines changed

.eslintrc.js

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const restrictedImports = [
66
},
77
{
88
name: 'lodash',
9-
// [TODO] Update this list as we start moving away from lodash.
9+
// [TODO] Update this list as we start moving away from lodash.
1010
importNames: [
11-
'memoize'
11+
'memoize',
1212
],
1313
message:
1414
'This Lodash method is not recommended. Please use native functionality instead. If using `memoize`, please use `memize` instead.',
@@ -50,16 +50,47 @@ const restrictedImports = [
5050
];
5151

5252
module.exports = {
53-
root: true,
54-
extends: [
55-
'plugin:@wordpress/eslint-plugin/recommended',
53+
root: true,
54+
extends: [
55+
'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
5656
],
57-
rules: {
58-
'no-restricted-imports': [
57+
settings: {
58+
'import/resolver': {
59+
alias: {
60+
map: [
61+
[ '@', './src/app' ],
62+
],
63+
extensions: [ '.js', '.jsx', '.json', '.css', '.scss' ],
64+
},
65+
},
66+
},
67+
globals: {
68+
__: true,
69+
_n: true,
70+
sprintf: true,
71+
useContext: true,
72+
useEffect: true,
73+
useState: true,
74+
useLocation: true,
75+
useNavigate: true,
76+
},
77+
rules: {
78+
'no-restricted-imports': [
5979
'error',
6080
{
6181
paths: restrictedImports,
6282
},
6383
],
64-
}
65-
}
84+
'jsdoc/check-param-names': 'off',
85+
'jsdoc/no-undefined-types': [
86+
'error',
87+
{
88+
definedTypes: [
89+
'React',
90+
'JSX',
91+
'ReactNode',
92+
],
93+
},
94+
],
95+
},
96+
};

.github/scripts/set-version-bump.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/i18n-update.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: i18n Update Action
2+
3+
on:
4+
push:
5+
branches:
6+
- 'trunk'
7+
workflow_dispatch: # Allows manual trigger with a branch input
8+
inputs:
9+
base_branch:
10+
description: 'Base branch for the pull request'
11+
required: false
12+
default: 'trunk'
13+
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
jobs:
19+
call-i18n-update:
20+
uses: newfold-labs/workflows/.github/workflows/i18n-update.yml@main
21+
with:
22+
base_branch: ${{ inputs.base_branch || github.ref_name }}
23+
secrets:
24+
NEWFOLD_ACCESS_TOKEN: ${{ secrets.NEWFOLD_ACCESS_TOKEN }}

.github/workflows/newfold-prep-release.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,30 @@ on:
44
workflow_dispatch:
55
inputs:
66
level:
7-
description: The level of release to be used.
7+
description: 'The level of release to be used.'
88
type: choice
99
options:
10-
- patch
11-
- minor
12-
- major
10+
- 'patch'
11+
- 'minor'
12+
- 'major'
1313
default: 'patch'
1414
required: true
15+
# Disable permissions for all available scopes by default.
16+
# Any needed permissions should be configured at the job level.
17+
permissions: {}
1518

1619
jobs:
1720

18-
# This job is used to extract the branch name from the pull request or branch.
19-
setup:
20-
name: Setup
21-
runs-on: ubuntu-latest
22-
outputs:
23-
branch: ${{ steps.extract_branch.outputs.branch }}
24-
steps:
25-
- name: Extract branch name
26-
shell: bash
27-
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
28-
id: extract_branch
29-
3021
# This job runs the newfold module-prep-release workflow for this module.
3122
prep-release:
3223
name: Prepare Release
33-
needs: setup
34-
uses: newfold-labs/workflows/.github/workflows/module-prep-release.yml@add/preprelease
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
uses: newfold-labs/workflows/.github/workflows/reusable-module-prep-release.yml@main
3528
with:
3629
module-repo: ${{ github.repository }}
37-
module-branch: ${{ needs.setup.outputs.branch }}
30+
module-branch: 'trunk'
3831
level: ${{ inputs.level }}
39-
secrets: inherit
32+
json-file: 'package.json'
33+
php-file: 'bootstrap.php'

.github/workflows/prep-release.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

.github/workflows/prepare-release.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)