* Minify stream, add stream stuff to releases again
* Kill off a lot of tech debt, drop internal utilities from npm
1. Kill `module/`, internalize `bundler/`, privatize `test-utils/`
We've been telling people to move elsewhere from these for a while, and
it's about time we just pull the plug here and finally remove them.
- We officially removed the bundler from the public API in v2.0, and
that was the only one of these that was ever publicly documented.
Usage should be low enough by now it shouldn't break anyone- I'm not
seeing bundler bugs being reported anymore, either.
- The `module/` utility was so narrow and caveat-filled that I'm not
sure anyone really used it (even us core Mithril devs never really
used it), and we only had it documented in the repo folder it lived
in. I think only one bug was ever filed, and it's because it somehow
ended up completely non-functional without any of us realizing it.
- The test utilities were meant to be internal from day 1, but people
started using it despite us core developers constantly telling people
to look elsewhere and even the docs recommending specific alternatives
without mention of our internal mocks. (Now if people would RTFM,
that'd be nice...)
2. Add dedicated HTML test files to verify ospec and the promise
polyfill, and ensure the promise tests are in pure ES5.
These are made specially for those and should be much easier to just run
now.
3. Fix the benchmark script to use the real DOM in browsers and to not
require as many dependencies to create. Also, tweak them to be much
more effective and precise on what's being tested.
Previously, it was rendering to the HTML file itself, while now it's
rendering to the `body`. This means in browsers, it's triggering layout
and everything, benchmarking how well Mithril optimizes for style and
layout recalcs, too. It also puts some pressure on the hyperscript
parser attribute application, so that can be noticed as well.
* Update dependencies
Also, I normalized them to all be sentences for consistency, and I moved
the reentrancy check from `m.mount` to `m.render` to be a little more
helpful. The router change during mounting is inconsequential and only
to avoid the new modified error, and the change to the update loop is to
send the original error if an error occurred while initializing the
default route. (This is all around more useful anyways.)
And while I was at it, I fixed an obscure bug with sync redraws.
* Fix assertion descriptions
Move return statement to the end of define()
* ospec: Fix assertion definitions
* Fix typo in assertion
* Add test for descriptions being returned on fail
* Reference result instead of self in returned description method
* Fix style errors
* Actually return the check from `maybeSetContentEditable`
Lots of code paths relied on it being a boolean. When I created the
abstraction, I apparently forgot to make sure it returned the result.
* Don't forget to copy instance state over
* Update changelog [skip ci]
* Fix changelog issue [skip ci]
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is
released.
- It's "npm" not "NPM". It doesn't stand for anything, and it never
has - it was initially chosen simply because it was easy to type.
It has a lot of unofficial backronyms with "Node Package Manager"
being one of the most common ones, but it's never officially stood
for anything as an acronym *or* initialism.
- Fixed a few errors in the change log, like non-breaking changes being
included in the "Breaking Changes" section and an inaccuracy in the
summary of a particular change.
- Fixed RawGit URLs to point to GitHack, which is a lighter proxy that
offloads caching to Cloudflare instead of also implementing it itself.
(It also just uses nginx for all the important server logic, so it
scales better.)
- Add a few more v0.2 references as appropriate
* Fix#2414, address part of #1687
Also cleared the CSS up to be a lot more readable instead of smooshed
into a single line.
* Redo the testing docs page
- Addresses another part of #1687
- Also, fix a few linter issues in the ospec binary
* Add note about third-party cookies, tweak a line
* Make the JSX comparison much more meaningful
And let the code speak for itself. Don't fuel the flame wars any more
than what they've already become. We should be *unopinionated*, and so
I've updated those docs to remove the existing opinion.
* Remove a bunch of outdated ES6 references
* Remove the CSS page
Also, correct the change logs to be much more consistent between each
other and ensure the ospec and stream change logs are linked to from
Mithril's primary change log.
- I also fixed a bunch of related comments
- I had to polyfill `requestAnimationFrame` for Node
- Drive-by: run `eslint . --fix`
- Drive-by: update transpiling info in CONTRIBUTING.md
- Drive-by: we aren't the only ones going semicolon-free
* ospec: all results, failing and passing, include .message and .context
Previously only failing tests had .message and .context.
* Updated docs
* Function was ugly
* Ospec verbose passing tests: put changelog update in right place
* Ospec: added assertion that function does/doesnt throw error
* Ospec.throws passes npm test
* Ospec.throws: Address requested changes
* Ospec: message comparison support for .throws/.notthrows
Credit to @maranomynet, #2227
- Fix custom elements attribute application to acknowledge that not all
custom elements operate purely based on attributes. (Plus, those
blasted things are verbose as heck when you're working with them in
raw form. It's also not that uncommon for functionality to be exposed
via property and *not* attribute.)
- Don't memoize the normalized value when we 1. only use it once in each
branch, and 2. only use it for a few special cases.
- Centralize the "has property key" code, so it's easier to tune and
read. I also inlined a couple functions while I was at it since they
were small and only used once.
- Actually test for how attributes are applied to raw DOM elements vs
when we choose to use keys. When I first developed the patch, it
silently worked, when I should've been breaking things.