3.1.3
Changes
SEO prerendering:
- The sanitizer,
stripBindingsFrom()andstripClobberingNamesFrom()now also clean a template's own children. In browsers and jsdom, a parsed template has none, so their output is unchanged. - The string forms had the same problem during prerendering, and are fixed.
- No longer crashes on libraries that read DOM getters off their prototypes.
- The SSR polyfills (
tools/builder/core/seo/ssr/ssr-polyfills.js, newinstallSpecAccessors(window)) now give each of these prototypes an accessor that resolves asnode[name]would:Node:nodeType,nodeName,ownerDocument,parentNode,parentElement,childNodes,firstChild,lastChild,previousSibling,nextSibling,textContentElement:children,attributes,localName,namespaceURI,tagName,firstElementChild,nextElementSiblingDocumentFragment:childrenHTMLTemplateElement:content
- It also covers the case that failed silently: linkedom's
Node.prototypegetters forchildNodes,firstChild,nextSiblingandtextContent.
- The sanitizer,
i18n:
i18ninnutin.config.jsnow lists the languages.i18n: ['en', 'fr']turns i18n on, the first language being the default.i18n: []turns it off, and is the default for new projects.i18n: trueandi18n: falsestill work.truelists no language, so it means English only, and the build warns about it.nutin-updatemigrates existing projects. The update summary says what it will do, and the confirmation asks for it.i18n: truebecomes theconfig/languages.jsonlist, the default language first.i18n: falsebecomes[], and the update prints the dropped list. A list you already wrote is kept. With noi18noption at all (an extension), thenconfig/languages.jsonis deleted.
nutin-update: AnAGENTS.mdthat only differs by its "generated with Nutin X" line no longer counts as edited by you. It's updated in place. When you did edit it, the new version line merges without a conflict, even with your edits right next to it.Browser extension projects:
- New extension projects no longer get the tools their build never runs:
tools/builder/core/seo/, with thelinkedomdevDependency;tools/builder/core/i18n/;tools/builder/core/prod-bundle/compress-files.js;config/seo.json.
- The builder now runs without a
config/folder. - Existing extension projects:
nutin-updatelists those files as no longer generated and leaves them in place, along withconfig/seo.json: you can delete them. It also reportslinkedomas no longer needed, without removing it.
- New extension projects no longer get the tools their build never runs: