- `pr.yml` should've been deleted a long time ago. Its functionality
was already elsewhere, and that's since been folded into `test.yml`.
- I added automatic `release-v*` and `main-v*` versioning.
- Renamed `merge.yml` to `push-release.yml` and `push-main.yml` to
`pr-create-release.yml` so it's clearer what they're actually
listening to. I also modified their display names.
1. I want to set the stage to deal with #2898 properly.
2. `request` was deprecated years ago. Decided that it's better to just
move to native Node.js APIs in its place.
3. `glob` was outdated, and it's easier to just toss it than to upgrade
across a major version.
4. I switched to using Marked's "lexer" directly so I'm not fussing
with the complexity of renderers. This of course necessitated a more
complex file processor as its "lexer" is really an AST parser.
I also decided to go a few steps further:
- Drop the cache to simplify everything. I might reverse this later,
but just caching URLs per-page should be enough to prevent the world
from crashing down.
- Drop some more dependencies, so I don't have to come back to this
later nearly as quickly.
- Upgrade to a more modern language version in the scripts.
- Update Marked. It was super outdated.
- Add line and column numbers to the warnings. That took quite a bit of
work, thanks to a missing Marked feature plus a bug in Marked.
### Pimp the docs linter (and assorted changes)
#### `scripts/lint-docs.js`
- Add an optional cache for faster runs
- Add a final report
- Don't return anything from `exec()`
- Cover more files
#### `scripts/_command.js`
- Look for a "--cache" option
#### `package.json` scripts
- Added `watch:lint-docs`
- Added `cleanup:lint` to remove the eslint and lint-docs cache files
- Changed `lint:docs` to use the `--cache` option
- Added `test:js` so that we can run the test suite without the linter
- Changed `test` to defer to `test:js`
#### Actual lint fixes:
- Bad link in a migration guide
- The unicode dashes in the "https://en.wikipedia.org/wiki/Subject–verb–object" are not escaped by marked
### Some more lint-docs pimping
#### `scripts/lint-docs.js`
- some code reorg and cleanup (take a hint from the local coding conventions)
- fix misc bugs
- pass a User-Agent header to the requests
- even nicer reporting
#### `package.json`
- bump the @babel/parser dep to the latest
#### Docs
- tweaks based on lints missed due to previous bugs
### Docs: use the github page for velocity.js, the home page has too many errors.
Co-Authored-By: Isiah Meadows <contact@isiahmeadows.com>
* 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
- Correct docs generation to always fetch its dependency
- Don't try to close a handle that's already been closed by other methods
- Allow the release script to actually be testable.
* Drop `m.version`
It's caused way too much grief over the years, and I've finally decided
it's worth pitching. For those who need it, it's easy to get, especially
if you use it through Node or a build system. And for those who are just
loading it globally, you have to explicitly specify the version anyways,
so you'd be just as golden if you followed it up with a simple inline
script that does `m.version = "the version you loaded"`.
Oh, and also, you shouldn't be coding specifically for version numbers,
either - it's a known anti-pattern. Instead, you should prefer feature
detection and just do the right thing.
* Update changelog [skip ci]