chore: release#955
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis is a standard Changesets-generated release PR bumping all packages from
Confidence Score: 5/5Safe to merge — this is a Changesets release PR with a well-contained security hardening to the print window helper, backed by unit tests and clean re-export wiring. The substantive change is the rewrite of No files require special attention.
|
| Filename | Overview |
|---|---|
| packages/core/src/utils/print.ts | Core security fix: openPrintWindow rebuilt via DOM APIs; title assigned as property (not injected as HTML), content parsed with DOMParser+importNode. opener=null added for reverse-tabnabbing defence. |
| packages/core/src/utils/tests/print.test.ts | New unit tests verifying the title-breakout XSS payload renders as inert text and that no script element is introduced by content. |
| packages/react/src/components/ui/PrintPreview.tsx | PrintPreview now re-exports all framework-agnostic print helpers from core; React-specific JSX (PrintButton, PrintStyles) stays local. |
| packages/core/package.json | Version bumped from 1.8.3 to 1.8.4; no other changes. |
| packages/react/package.json | Version bumped to 1.8.4; internal monorepo dep pins updated to ^1.8.4. |
| packages/vue/package.json | Version bumped to 1.8.4; internal monorepo dep pins updated to ^1.8.4. |
| packages/nuxt/package.json | Version bumped to 1.8.4; vue peer dependency pin updated to ^1.8.4. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["openPrintWindow(title, content)"] --> B{window defined?}
B -- No --> Z[return null]
B -- Yes --> C["window.open('', '_blank')"]
C --> D{popup opened?}
D -- No --> Z
D -- Yes --> E["w.opener = null\n(reverse-tabnabbing defence)"]
E --> F["doc.title = title\n(property assignment — not HTML)"]
F --> G["createElement('style')\nstyle.textContent = PRINT_CSS"]
G --> H["DOMParser.parseFromString(content, 'text/html')\n(parsed in inert document)"]
H --> I["importNode each child\ninto popup document"]
I --> J[return popup Window]
style E fill:#d4edda,stroke:#28a745
style F fill:#d4edda,stroke:#28a745
style H fill:#d4edda,stroke:#28a745
style I fill:#d4edda,stroke:#28a745
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["openPrintWindow(title, content)"] --> B{window defined?}
B -- No --> Z[return null]
B -- Yes --> C["window.open('', '_blank')"]
C --> D{popup opened?}
D -- No --> Z
D -- Yes --> E["w.opener = null\n(reverse-tabnabbing defence)"]
E --> F["doc.title = title\n(property assignment — not HTML)"]
F --> G["createElement('style')\nstyle.textContent = PRINT_CSS"]
G --> H["DOMParser.parseFromString(content, 'text/html')\n(parsed in inert document)"]
H --> I["importNode each child\ninto popup document"]
I --> J[return popup Window]
style E fill:#d4edda,stroke:#28a745
style F fill:#d4edda,stroke:#28a745
style H fill:#d4edda,stroke:#28a745
style I fill:#d4edda,stroke:#28a745
Reviews (1): Last reviewed commit: "chore: release" | Re-trigger Greptile
0fdcfb5 to
ab15a40
Compare
ab15a40 to
ce0a770
Compare
ce0a770 to
37fece2
Compare
37fece2 to
a83e3ca
Compare
a83e3ca to
bfec794
Compare
bfec794 to
4fa023c
Compare
4fa023c to
b1cc9e5
Compare
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@eigenpal/docx-editor-core@1.9.0
Minor Changes
826aa32: Add an
{ all: true }option tosetContentControlContent,setContentControlValue, andremoveContentControlto apply the change to every content control matching the filter — across headers and footers with{ includeHeadersFooters: true }— instead of only the first. This covers one logical value that recurs under a shared tag (e.g. a name in the body, a running header, and several table cells). The default stays first-match. An{ all: true }run is atomic: if any matched control is refused by a lock, type, or data-binding guard, nothing is written unless{ force: true }.826aa32: Add
createContentControlto wrap a text span (including inside a table cell) in a new content control, returning a new document plus the created control with an auto-assigned uniquew:id.setContentControlValuenow sets dropdown/date/checkbox values on inline controls too, including inside table cells and — with{ includeHeadersFooters: true }— headers and footers. Date controls serialize their format to<w:dateFormat>.826aa32: Content-control addressing now covers inline (
w:sdt-in-paragraph) controls, including inside table cells:findContentControls,findContentControl,setContentControlContent,setContentControlValue, andremoveContentControldiscover and edit them, and{ includeHeadersFooters: true }also reaches headers and footers. Results carrykindandlocation. The live-editorDocxEditorRefmethods (React and Vue) gain the same inline support.Because of this,
findContentControlsnow returns inline controls in the body that earlier versions skipped — code relying on the old block-only results (counts, first match) should re-check.Patch Changes
w:themeFontLang(e.g. Japanese → MS Mincho), so line breaking and rendering use the correct font and wrap within the page.nil/noneborders on export. A cell that hides the table's default grid by setting<w:tcBorders>sides tonilno longer loses that override on save, so hidden gridlines stay hidden after a round-trip instead of re-inheriting the table's grid. The same applies to paragraph (w:pBdr) and page (w:pgBorders) borders, which had the identical bug. Fixes DOCX export drops explicit per-cell nil <w:tcBorders>, making hidden table gridlines reappear #947.openPrintWindowto build the print window via DOM APIs instead ofdocument.write, so a crafted document title cannot break out into executable markup. The framework-agnostic print helpers are now exported from@eigenpal/docx-editor-coreas the single source of truth, and the React package re-exports them unchanged.@eigenpal/nuxt-docx-editor@1.9.0
Patch Changes
@eigenpal/docx-editor-react@1.9.0
Patch Changes
openPrintWindowto build the print window via DOM APIs instead ofdocument.write, so a crafted document title cannot break out into executable markup. The framework-agnostic print helpers are now exported from@eigenpal/docx-editor-coreas the single source of truth, and the React package re-exports them unchanged.@eigenpal/docx-editor-vue@1.9.0
Patch Changes
@eigenpal/docx-editor-agents@1.9.0
@eigenpal/docx-editor-i18n@1.9.0