Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Unreleased]

### Fixed

- Works again in the browsers jQuery 4 supports, Internet Explorer 11 included: `dist/` is compiled to ES5 and calls no API IE 11 lacks (3.0.0 needed ES2022). `matreshka.min.js` is 73 kB minified, 24 kB with gzip; `matreshka.min.mjs`, which needs a browser with ES modules, stays modern.
- On IE 11, a `Matreshka.Array` has the array methods the browser has, as a native array does: no `includes`, `find`, `at` and the like. `promiseCalc` there needs a promise (or a `Promise` polyfill) when the handler returns a plain value.

## [3.0.0] - 2026-10-17

3.0.0 is a new major version: one package, written in TypeScript, ES modules only. The API of 2.x stays; the changes below say what moved and what was removed.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A fix or a feature comes with a test; a fix's test fails on the code before it.

## Layout

- `src/` — the package, in TypeScript. `src/index.ts` is the `matreshka` entry, `src/router/` and `src/parse-form/` are `matreshka/router` and `matreshka/parse-form`, `src/bundle.ts` is the script-tag bundle. `npm run build` writes `dist/`: ES modules with type declarations, `dist/matreshka.js` and `dist/matreshka.min.js` for a script tag, and `dist/matreshka.min.mjs`, the same as one ES module for a CDN.
- `src/` — the package, in TypeScript. `src/index.ts` is the `matreshka` entry, `src/router/` and `src/parse-form/` are `matreshka/router` and `matreshka/parse-form`, `src/bundle.ts` is the script-tag bundle. `npm run build` writes `dist/`: ES modules with type declarations, compiled to ES5, `dist/matreshka.js` and `dist/matreshka.min.js` for a script tag, and `dist/matreshka.min.mjs`, the same as one ES module for a CDN. The package runs in the browsers jQuery 4 supports, IE 11 included: `npm run check:dist` checks that `dist/` is ES5, runs `test/legacy/scenario.js` in a page without the APIs IE 11 lacks, and runs the tests on `dist/` (`npm run test:dist`). Open `test/legacy/index.html` over http to run the same scenario in a real browser.
- `test/` — the tests (Vitest, jsdom).
- `docs/` — the site at [matreshka.js.org](https://matreshka.js.org): one page per language (English, Ukrainian, Russian) built from the Markdown in `docs/content/<lang>/`; the menu order is in `docs/src/site.mjs`. `npm run dev -w matreshka-docs` serves it at http://localhost:4807 and rebuilds on change (run `npm run build` first: the site serves the bundle from `dist/`).
- `examples/` — the example apps, published on the site.
Expand Down
17 changes: 16 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,20 @@
"noExplicitAny": "off"
}
}
}
},
"overrides": [
{
"includes": ["test/legacy/**"],
"linter": {
"rules": {
"complexity": {
"useArrowFunction": "off"
},
"style": {
"useTemplate": "off"
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion docs/content/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { parseForm } from 'matreshka/parse-form';

### A script tag

Without a bundler, load the browser bundle. It defines the global `Matreshka`, with the router and the form parser on it: `Matreshka.initRouter`, `Matreshka.Router` and `Matreshka.parseForm`. The bundle targets current browsers.
Without a bundler, load the browser bundle. It defines the global `Matreshka`, with the router and the form parser on it: `Matreshka.initRouter`, `Matreshka.Router` and `Matreshka.parseForm`. It works in the browsers jQuery 4 supports, Internet Explorer 11 included.

```html
<script src="https://cdn.jsdelivr.net/npm/matreshka@3/dist/matreshka.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Binding a property gives it a getter and a setter. Assigning `app.x = 'hi'` runs
- Change events, including on nested data
- A router and a form parser

It's about 19 kB gzipped, with TypeScript types included.
It's about 24 kB gzipped, with TypeScript types included.

## What it isn't

Expand Down
2 changes: 1 addition & 1 deletion docs/content/ru/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { parseForm } from 'matreshka/parse-form';

### Тег script

Без сборщика подключите браузерный бандл. Он определяет глобальную переменную `Matreshka` с роутером и парсером форм: `Matreshka.initRouter`, `Matreshka.Router` и `Matreshka.parseForm`. Бандл рассчитан на современные браузеры.
Без сборщика подключите браузерный бандл. Он определяет глобальную переменную `Matreshka` с роутером и парсером форм: `Matreshka.initRouter`, `Matreshka.Router` и `Matreshka.parseForm`. Он работает в тех же браузерах, что и jQuery 4, включая Internet Explorer 11.

```html
<script src="https://cdn.jsdelivr.net/npm/matreshka@3/dist/matreshka.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/ru/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Matreshka.js связывает JavaScript-объекты с HTML, которы
- События изменений, в том числе для вложенных данных
- Роутер и парсер форм

Около 19 кБ в gzip, с типами TypeScript.
Около 24 кБ в gzip, с типами TypeScript.

## Чем она не является

Expand Down
2 changes: 1 addition & 1 deletion docs/content/ua/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { parseForm } from 'matreshka/parse-form';

### Тег script

Без збирача підключіть браузерний бандл. Він визначає глобальну змінну `Matreshka` з роутером і парсером форм: `Matreshka.initRouter`, `Matreshka.Router` і `Matreshka.parseForm`. Бандл розрахований на сучасні браузери.
Без збирача підключіть браузерний бандл. Він визначає глобальну змінну `Matreshka` з роутером і парсером форм: `Matreshka.initRouter`, `Matreshka.Router` і `Matreshka.parseForm`. Він працює в тих самих браузерах, що й jQuery 4, зокрема в Internet Explorer 11.

```html
<script src="https://cdn.jsdelivr.net/npm/matreshka@3/dist/matreshka.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/ua/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Matreshka.js поєднує JavaScript-об’єкти з HTML, який уже
- Події змін, зокрема для вкладених даних
- Роутер і парсер форм

Близько 19 кБ у gzip, з типами TypeScript.
Близько 24 кБ у gzip, з типами TypeScript.

## Чим вона не є

Expand Down
Loading
Loading