Skip to content

Commit f17796c

Browse files
authored
Fix rotting CI checks (snapshot time-bomb + deprecated upload-artifact) (#502)
* v1.1.0 * Fix rotting CI checks (snapshot time-bomb + deprecated upload-artifact) - renderTemplate snapshot hardcoded the copyright year (© 2023); the footer renders new Date().getFullYear(), so it broke on the year rollover. Freeze the clock in the test so the snapshot is stable across calendar years instead of re-breaking every Jan 1. - cypress.yml used cypress-io/github-action@v4, which transitively pulls actions/upload-artifact@v3 — now auto-failed by GitHub. Bump to @v6 (matches e2e.yml). - cypress_integration.yml used actions/upload-artifact@v3 directly; bump to @v4. Does not touch the e2e matrix, which has separate upstream-drift failures (create-next-app needs node>=20.9, jest missing in standalone scaffolds).
1 parent 90af52d commit f17796c

11 files changed

Lines changed: 54 additions & 28 deletions

File tree

.changeset/orange-dancers-whisper.md

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

.changeset/rich-adults-train.md

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

.github/workflows/cypress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Build the app
2121
run: yarn build
2222
- name: Cypress run
23-
uses: cypress-io/github-action@v4
23+
uses: cypress-io/github-action@v6
2424
env:
2525
DEBUG: "@cypress/github-action"
2626
with:

.github/workflows/cypress_integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Cypress run integration tests
4545
run: yarn test:integration:cypress
4646
- name: cypress-integration-upload-artifacts
47-
uses: actions/upload-artifact@v3
47+
uses: actions/upload-artifact@v4
4848
if: failure()
4949
with:
5050
name: cypress-integration-artifacts

packages/cli/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# mailing
22

3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- f6b5140: remove anonymous telemetry and email collection
8+
9+
### Patch Changes
10+
11+
- dc2d009: bump peer dep to next 14
12+
- Updated dependencies [dc2d009]
13+
- Updated dependencies [f6b5140]
14+
- mailing-core@1.1.0
15+
316
## 1.0.2
417

518
### Patch Changes

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mailing",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"main": "dist/mailing.cjs.js",
55
"license": "MIT",
66
"homepage": "https://github.com/sofn-xyz/mailing#readme",
@@ -77,7 +77,7 @@
7777
"html-minifier-terser": "^7.0.0",
7878
"iron-session": "^6.2.1",
7979
"lodash": "^4.17.21",
80-
"mailing-core": "^1.0.2",
80+
"mailing-core": "^1.1.0",
8181
"mjml": "^4.12.0",
8282
"node-fetch": "^2.6.7",
8383
"node-html-parser": "^6.1.1",

packages/cli/src/util/__test__/renderTemplate.test.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,19 @@ describe("renderTemplate", () => {
1111
});
1212

1313
it("returns rendered html", () => {
14-
const { error, mjmlErrors, html } = renderTemplate("AccountCreated", {
15-
name: "Test User",
16-
});
17-
expect(mjmlErrors).toEqual([]);
18-
expect(error).toBeUndefined();
19-
expect(html).not.toBeUndefined();
20-
expect(html).toMatchSnapshot();
14+
// Freeze the clock so the footer's "© {year}" copyright renders
15+
// deterministically — otherwise this snapshot rots every Jan 1.
16+
jest.useFakeTimers().setSystemTime(new Date("2023-06-15T00:00:00Z"));
17+
try {
18+
const { error, mjmlErrors, html } = renderTemplate("AccountCreated", {
19+
name: "Test User",
20+
});
21+
expect(mjmlErrors).toEqual([]);
22+
expect(error).toBeUndefined();
23+
expect(html).not.toBeUndefined();
24+
expect(html).toMatchSnapshot();
25+
} finally {
26+
jest.useRealTimers();
27+
}
2128
});
2229
});

packages/core/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# mailing-core
22

3+
## 1.1.0
4+
5+
### Minor Changes
6+
7+
- f6b5140: remove anonymous telemetry and email collection
8+
9+
### Patch Changes
10+
11+
- dc2d009: bump peer dep to next 14
12+
313
## 1.0.2
414

515
### Patch Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mailing-core",
3-
"version": "1.0.2",
3+
"version": "1.1.0",
44
"main": "dist/mailing-core.cjs.js",
55
"license": "MIT",
66
"description": "Fun email development environment (core library only)",

packages/web/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# web
22

3+
## 1.0.2
4+
5+
### Patch Changes
6+
7+
- dc2d009: bump peer dep to next 14
8+
- Updated dependencies [dc2d009]
9+
- Updated dependencies [f6b5140]
10+
- mailing-core@1.1.0
11+
312
## 1.0.1
413

514
### Patch Changes

0 commit comments

Comments
 (0)