Skip to content

Commit 0aa9c55

Browse files
authored
Version Packages (mailing 1.2.0, mailing-core 1.1.2)
Consumes the pending changesets: mailing 1.1.0->1.2.0 (minor), mailing-core 1.1.1->1.1.2 (patch). CHANGELOGs updated.
1 parent 378a320 commit 0aa9c55

6 files changed

Lines changed: 34 additions & 20 deletions

File tree

.changeset/fix-mjml2html-async-type-drift.md

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

.changeset/next-react-peer-range.md

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

packages/cli/CHANGELOG.md

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

3+
## 1.2.0
4+
5+
### Minor Changes
6+
7+
- aae797d: Update peer dependency ranges to the last two major versions of the frameworks mailing supports: `next@^15 || ^16` and `react`/`react-dom@^18 || ^19` (previously `next@^12–14`, `react@^17–18`). This removes peer-dependency warnings for projects on current Next.js and React, which the e2e matrix now exercises.
8+
9+
### Patch Changes
10+
11+
- 71141c7: Make the generated `.mailing` preview build resilient to upstream toolchain drift.
12+
13+
- The render helpers (`mailing-core` and `mailing`) now assert the awaited (unwrapped) return type of `mjml2html`. `@types/mjml` pulls `@types/mjml-core` via a `*` range, which now resolves to v5 where `mjml2html` is typed as async (`Promise<MJMLParseResults>`); since mailing pins `mjml@^4` (synchronous at runtime), the mismatched types broke `next build` type-checking. The assertion is a no-op when the resolved types are already synchronous.
14+
- `next build` of the `.mailing` app type-checks any imported `node_modules` `.ts` source, so third-party packages that ship broken or too-modern TypeScript (e.g. `iron-session`'s raw `next/index.ts`, or a newer `@types/node` than the resolved compiler can parse) failed the build. Type errors are now ignored for end users during that build (kept on for mailing's own dev via `MM_DEV`), mirroring the existing `eslint.ignoreDuringBuilds`.
15+
- `export-previews` failed with `SyntaxError: Unexpected token '<'` in projects whose tsconfig sets `jsx: "preserve"` (e.g. Next.js and Remix scaffolds): esbuild-register passed that through and left JSX untranspiled when loading email templates. The require hook now overrides `tsconfigRaw` to force the automatic JSX runtime.
16+
- Loading previews failed with `ReferenceError: require is not defined` in ESM projects (`"type": "module"`, e.g. Remix's JavaScript template): esbuild-register's CommonJS require-hook rewrote `.js` files to `require(...)`, which throws once Node executes them as ESM. In ESM projects the hook now only handles `.ts`/`.tsx`/`.jsx` and leaves `.js` to Node.
17+
- The `.mailing` preview app failed under Next 16, which defaults both `next build` and the dev server to Turbopack — its analysis can't follow the app's dynamic requires (the generated Prisma client during build; `uglify-js` at runtime, returning 500s). On Next >= 15 the build now passes `--webpack` and the programmatic dev server passes `webpack: true` (older Next uses webpack by default).
18+
19+
- Updated dependencies [71141c7]
20+
- mailing-core@1.1.2
21+
322
## 1.1.0
423

524
### Minor 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.1.0",
3+
"version": "1.2.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.1.0",
80+
"mailing-core": "^1.1.2",
8181
"mjml": "^4.12.0",
8282
"node-fetch": "^2.6.7",
8383
"node-html-parser": "^6.1.1",

packages/core/CHANGELOG.md

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

3+
## 1.1.2
4+
5+
### Patch Changes
6+
7+
- 71141c7: Make the generated `.mailing` preview build resilient to upstream toolchain drift.
8+
9+
- The render helpers (`mailing-core` and `mailing`) now assert the awaited (unwrapped) return type of `mjml2html`. `@types/mjml` pulls `@types/mjml-core` via a `*` range, which now resolves to v5 where `mjml2html` is typed as async (`Promise<MJMLParseResults>`); since mailing pins `mjml@^4` (synchronous at runtime), the mismatched types broke `next build` type-checking. The assertion is a no-op when the resolved types are already synchronous.
10+
- `next build` of the `.mailing` app type-checks any imported `node_modules` `.ts` source, so third-party packages that ship broken or too-modern TypeScript (e.g. `iron-session`'s raw `next/index.ts`, or a newer `@types/node` than the resolved compiler can parse) failed the build. Type errors are now ignored for end users during that build (kept on for mailing's own dev via `MM_DEV`), mirroring the existing `eslint.ignoreDuringBuilds`.
11+
- `export-previews` failed with `SyntaxError: Unexpected token '<'` in projects whose tsconfig sets `jsx: "preserve"` (e.g. Next.js and Remix scaffolds): esbuild-register passed that through and left JSX untranspiled when loading email templates. The require hook now overrides `tsconfigRaw` to force the automatic JSX runtime.
12+
- Loading previews failed with `ReferenceError: require is not defined` in ESM projects (`"type": "module"`, e.g. Remix's JavaScript template): esbuild-register's CommonJS require-hook rewrote `.js` files to `require(...)`, which throws once Node executes them as ESM. In ESM projects the hook now only handles `.ts`/`.tsx`/`.jsx` and leaves `.js` to Node.
13+
- The `.mailing` preview app failed under Next 16, which defaults both `next build` and the dev server to Turbopack — its analysis can't follow the app's dynamic requires (the generated Prisma client during build; `uglify-js` at runtime, returning 500s). On Next >= 15 the build now passes `--webpack` and the programmatic dev server passes `webpack: true` (older Next uses webpack by default).
14+
315
## 1.1.1
416

517
### 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.1.1",
3+
"version": "1.1.2",
44
"main": "dist/mailing-core.cjs.js",
55
"license": "MIT",
66
"description": "Fun email development environment (core library only)",

0 commit comments

Comments
 (0)