Skip to content

Commit cf430f2

Browse files
authored
Merge branch 'main' into add-multiple-filter-values
2 parents ed53741 + 2ffe3f8 commit cf430f2

File tree

21 files changed

+470
-132
lines changed

21 files changed

+470
-132
lines changed

.github/workflows/nodejs.yml

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Node CI
22

33
on:
44
push:
5-
branches:
6-
- main
75
pull_request:
86
types: [opened, synchronize, reopened]
97

@@ -28,73 +26,37 @@ jobs:
2826
matrix:
2927
os: [macos-latest, windows-latest, ubuntu-latest]
3028
node-version: [18.x, 20.x]
29+
fail-fast: true
3130
if: ${{ needs.changes.outputs.cms == 'true' }}
3231
steps:
3332
- uses: actions/checkout@v3
34-
- name: Use Node.js {{ matrix.node-version }}
33+
- name: Use Node.js ${{ matrix.node-version }}
3534
uses: actions/setup-node@v3
3635
with:
3736
node-version: ${{ matrix.node-version }}
3837
check-latest: true
38+
cache: 'npm'
3939
- name: log versions
4040
run: node --version && npm --version && yarn --version
41-
- name: install dependecies
42-
run: npm install
41+
- name: install dependencies
42+
run: npm ci
4343
- name: run unit tests
4444
run: npm run test:ci
45-
env:
46-
CI: true
47-
NODE_OPTIONS: --max-old-space-size=4096
4845
- name: build demo site
4946
run: npm run build:demo
47+
- name: run e2e tests
48+
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
49+
run: npm run test:e2e:run-ci
5050
env:
51-
NODE_OPTIONS: --max-old-space-size=4096
52-
- uses: actions/upload-artifact@master
53-
with:
54-
name: dev-test-website-${{ runner.os }}-${{ matrix.node-version }}
55-
path: dev-test
56-
57-
e2e-with-cypress:
58-
needs: [changes, build]
59-
runs-on: ubuntu-latest
60-
61-
strategy:
62-
matrix:
63-
node-version: [18.x, 20.x]
64-
fail-fast: false
65-
66-
if: ${{ needs.changes.outputs.cms == 'true' }}
67-
steps:
68-
- uses: actions/checkout@v3
69-
- name: Use Node.js
70-
uses: actions/setup-node@v3
71-
with:
72-
node-version: ${{ matrix.node-version }}
73-
check-latest: true
74-
- uses: actions/download-artifact@master
75-
with:
76-
name: dev-test-website-${{ runner.os }}-18.x
77-
path: dev-test
78-
- name: npm install
79-
run: |
80-
node --version
81-
npm --version
82-
yarn --version
83-
npm install
84-
- name: e2e test
85-
run: |
86-
npm run test:e2e:run-ci
87-
env:
88-
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }}
51+
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true || github.repository_owner != 'decaporg' }}
8952
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
9053
NODE_OPTIONS: --max-old-space-size=4096
91-
MACHINE_COUNT: 2
92-
MACHINE_INDEX: ${{ matrix.node-version }}
9354
TZ: Europe/Amsterdam
9455
- uses: actions/upload-artifact@v3
95-
if: ${{ always() }}
56+
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' && failure()
9657
with:
97-
name: cypress-results-${{ matrix.node-version }}
58+
name: cypress-results
9859
path: |
9960
cypress/screenshots
10061
cypress/videos
62+

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const svgo = {
4242
function presets() {
4343
return [
4444
'@babel/preset-react',
45-
'@babel/preset-env',
45+
['@babel/preset-env', isESM ? { modules: false } : {}],
4646
[
4747
'@emotion/babel-preset-css-prop',
4848
{

cypress/run.mjs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@ import execa from 'execa';
22
import { globby } from 'globby';
33

44
async function runCypress() {
5+
const args = ['run', '--browser', 'chrome', '--headless'];
6+
7+
const specs = await globby(['cypress/e2e/*spec*.js']);
8+
if (specs.length === 0) {
9+
console.log('No test files found in cypress/e2e/*spec*.js');
10+
process.exit(1);
11+
}
12+
513
if (process.env.IS_FORK === 'true') {
614
const machineIndex = parseInt(process.env.MACHINE_INDEX);
715
const machineCount = parseInt(process.env.MACHINE_COUNT);
8-
const specs = await globby(['cypress/integration/*spec*.js']);
916
const specsPerMachine = Math.floor(specs.length / machineCount);
1017
const start = (machineIndex - 1) * specsPerMachine;
1118
const machineSpecs =
1219
machineIndex === machineCount
1320
? specs.slice(start)
1421
: specs.slice(start, start + specsPerMachine);
1522

16-
await execa(
17-
'cypress',
18-
['run', '--browser', 'chrome', '--headless', '--spec', machineSpecs.join(',')],
19-
{ stdio: 'inherit', preferLocal: true },
20-
);
23+
args.push('--spec', machineSpecs.join(','));
2124
} else {
22-
await execa(
23-
'cypress',
24-
[
25-
'run',
26-
'--browser',
27-
'chrome',
28-
'--headless',
29-
'--record',
30-
'--parallel',
31-
'--ci-build-id',
32-
process.env.GITHUB_SHA,
33-
'--group',
34-
'GitHub CI',
35-
],
36-
{ stdio: 'inherit', preferLocal: true },
25+
args.push(
26+
'--record',
27+
'--parallel',
28+
'--ci-build-id',
29+
process.env.GITHUB_SHA,
30+
'--group',
31+
'GitHub CI',
32+
'--spec',
33+
specs.join(','),
3734
);
3835
}
36+
37+
console.log('Running Cypress with args:', args.join(' '));
38+
await execa('cypress', args, { stdio: 'inherit', preferLocal: true });
3939
}
4040

4141
runCypress();

cypress/support/e2e.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ addMatchImageSnapshotCommand({
2626
Cypress.on('uncaught:exception', () => false);
2727

2828
import './commands';
29+
30+
afterEach(function () {
31+
if (this.currentTest.state === 'failed') {
32+
Cypress.runner.stop();
33+
}
34+
});

nx.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"targetDefaults": {
33
"build:esm": {
4-
"cache": true
4+
"cache": true,
5+
"dependsOn": ["^build:esm"]
56
},
67
"build": {
7-
"cache": true
8+
"cache": true,
9+
"dependsOn": ["^build"]
810
}
911
},
1012
"namedInputs": {

package-lock.json

Lines changed: 8 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build-preview": "npm run build && nx run decap-cms:build-preview --output-style=stream",
99
"type-check": "tsc --noEmit",
1010
"type-check:watch": "npm run type-check -- --watch",
11-
"clean": "rimraf \"packages/*/dist\" dev-test/dist \"packages/*/node_modules\"",
11+
"clean": "rimraf \"packages/*/dist\" dev-test/dist \"packages/*/node_modules\" \".nx/cache\"",
1212
"reset": "npm run clean",
1313
"test": "npm run lint && npm run type-check && npm run test:unit",
1414
"test:all": "npm run test && npm run test:e2e",

packages/decap-cms-app/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [3.5.0](https://github.com/decaporg/decap-cms/compare/decap-cms-app@3.4.0...decap-cms-app@3.5.0) (2025-01-15)
7+
8+
### Bug Fixes
9+
10+
- **build:** Fix ESM output ([#7357](https://github.com/decaporg/decap-cms/issues/7357)) ([#7358](https://github.com/decaporg/decap-cms/issues/7358)) ([6cd7cb3](https://github.com/decaporg/decap-cms/commit/6cd7cb3b41718e20b44acaae1e2ffd73129520c2))
11+
612
# [3.4.0](https://github.com/decaporg/decap-cms/compare/decap-cms-app@3.3.3...decap-cms-app@3.4.0) (2024-11-12)
713

814
**Note:** Version bump only for package decap-cms-app

packages/decap-cms-app/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "decap-cms-app",
33
"description": "An extensible, open source, Git-based, React CMS for static sites. Reusable congiuration with React as peer.",
4-
"version": "3.4.0",
4+
"version": "3.5.0",
55
"homepage": "https://www.decapcms.org",
66
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-app",
77
"bugs": "https://github.com/decaporg/decap-cms/issues",
8+
"module": "dist/esm/index.js",
89
"main": "dist/decap-cms-app.js",
910
"files": [
1011
"src/",
@@ -34,6 +35,7 @@
3435
"decap-cms-backend-azure": "^3.1.3",
3536
"decap-cms-backend-bitbucket": "^3.1.4",
3637
"decap-cms-backend-git-gateway": "^3.2.2",
38+
"decap-cms-backend-gitea": "^3.1.5",
3739
"decap-cms-backend-github": "^3.2.2",
3840
"decap-cms-backend-gitlab": "^3.2.2",
3941
"decap-cms-backend-proxy": "^3.1.4",
@@ -43,7 +45,7 @@
4345
"decap-cms-lib-auth": "^3.0.5",
4446
"decap-cms-lib-util": "^3.1.0",
4547
"decap-cms-lib-widgets": "^3.1.0",
46-
"decap-cms-locales": "^3.2.0",
48+
"decap-cms-locales": "^3.3.0",
4749
"decap-cms-ui-default": "^3.1.4",
4850
"decap-cms-widget-boolean": "^3.1.3",
4951
"decap-cms-widget-code": "^3.1.4",
@@ -55,7 +57,7 @@
5557
"decap-cms-widget-map": "^3.1.4",
5658
"decap-cms-widget-markdown": "^3.2.0",
5759
"decap-cms-widget-number": "^3.1.3",
58-
"decap-cms-widget-object": "^3.1.4",
60+
"decap-cms-widget-object": "^3.2.0",
5961
"decap-cms-widget-relation": "^3.3.2",
6062
"decap-cms-widget-select": "^3.2.2",
6163
"decap-cms-widget-string": "^3.1.3",

packages/decap-cms-locales/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [3.3.0](https://github.com/decaporg/decap-cms/compare/decap-cms-locales@3.2.0...decap-cms-locales@3.3.0) (2025-01-15)
7+
8+
### Features
9+
10+
- add mk (Macedonian) locale ([#7346](https://github.com/decaporg/decap-cms/issues/7346)) ([b41e43a](https://github.com/decaporg/decap-cms/commit/b41e43a73218f0950ea9c96f21dfe0a31aa173b3))
11+
- **locale/cs:** improve the Czech translations, add new strings from `en` ([#7326](https://github.com/decaporg/decap-cms/issues/7326)) ([76f4b74](https://github.com/decaporg/decap-cms/commit/76f4b7411684943c515a77932fcac743adce8733))
12+
613
# [3.2.0](https://github.com/decaporg/decap-cms/compare/decap-cms-locales@3.1.4...decap-cms-locales@3.2.0) (2024-08-07)
714

815
### Bug Fixes

packages/decap-cms-locales/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "decap-cms-locales",
33
"description": "Locales for Decap CMS.",
4-
"version": "3.2.0",
4+
"version": "3.3.0",
55
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-locales",
66
"bugs": "https://github.com/decaporg/decap-cms/issues",
77
"license": "MIT",

0 commit comments

Comments
 (0)