Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade prettier to 3.2 #296

Merged
merged 3 commits into from
Aug 6, 2024
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
3 changes: 2 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
52972ff01abab19a5861ac2364efc7471c336ae7
d0530dbba74c87bbeb02433a490c49c28c1deb9d
8546f1fd2784ef579ef951c6d3ec4c20b1b156c5
353fd24b7d01420d405377985dc5a43ea7b69498
353fd24b7d01420d405377985dc5a43ea7b69498
06a92c93b804776eca879d02c78ca0dc63eff97a
23 changes: 11 additions & 12 deletions .github/workflows/mathquill-pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ name: mathquill pr linting
on:
workflow_dispatch:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]
branches: ['main']

jobs:
build:

runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
Expand All @@ -21,12 +20,12 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: make
- run: make lint
- run: npx prettier --check '**/*.{ts,js,css,html}'
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: make
- run: make lint
- run: npx prettier --check '**/*.{ts,js,css,html}'
6 changes: 4 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"singleQuote": true
}
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "none"
}
45 changes: 34 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@
The major change in this interface version is the removal of MathQuill's dependency on JQuery.

**breaking changes:**

- `.revert()` now returns an HTML element rather than a JQuery collection
- The (undocumented) `substituteKeyboardEvents` configuration option is no longer supported
- The (undocumented) `overrideKeystroke` configuration option now receives a native `KeyboardEvent` as its second parameter (it previously received a JQuery event).
- In previous interface versions, `MQ.config()` changed the _global_ default configuration, shared across multiple API instances. On a v3 instance, however, it only affects the default configuration for the particular API instance on which it was called. E.g.:
- In previous interface versions, `MQ.config()` changed the _global_ default configuration, shared across multiple API instances. On a v3 instance, however, it only affects the default configuration for the particular API instance on which it was called. E.g.:

```javascript
// Interface v1 and v2
var MQ_a = MathQuill.getInterface(2), MQ_b = MathQuill.getInterface(2);
var MQ_a = MathQuill.getInterface(2),
MQ_b = MathQuill.getInterface(2);
MQ_a.config(myConfig);
MQ_a.MathField(el_a); // configured with myConfig
MQ_b.MathField(el_b); // configured with myConfig

// Interface v3
var MQ_c = MathQuill.getInterface(3), MQ_d = MathQuill.getInterface(3);
var MQ_c = MathQuill.getInterface(3),
MQ_d = MathQuill.getInterface(3);
MQ_c.config(myConfig);
MQ_c.MathField(el_a); // configured with myConfig
MQ_d.MathField(el_b); // unaffected by myConfig
```


## v0.10.1: Fix `font-size: 0` typing problems and more

_2016-03-21_
Expand All @@ -37,12 +40,13 @@ see the [v0.9.x → v0.10.0 Migration Guide][].)
[v0.9.x → v0.10.0 Migration Guide]: https://github.com/mathquill/mathquill/wiki/v0.9.x-%E2%86%92-v0.10.0-Migration-Guide

**new features:**

- (#544, #552, #558, #581) new symbols `\nparallel`, `\measuredangle`,
`\odot`, `\parallelogram` (nonstandard), `\nless`, `\ngtr`, `\square`
- (#544) new commands `\overleftarrow`, `\overrightarrow`


**bugfixes:**

- (#585) fix typing in Chrome Canary, Enter key in Webkit+Blink
- (#582) fix `\degree` symbol to round-trip (rather than exporting
`^\circ` which doesn't parse as one symbol)
Expand All @@ -59,6 +63,7 @@ see the [v0.9.x → v0.10.0 Migration Guide][].)
- (#525) fix Tab while there's a selection

**build system fixes:**

- (#532) add console output to show URL of local test pages

## v0.10.0: Total API overhaul, new features galore
Expand All @@ -72,18 +77,20 @@ itself): See the [v0.9.x → v0.10.0 Migration Guide]
(https://github.com/mathquill/mathquill/wiki/v0.9.x-%E2%86%92-v0.10.0-Migration-Guide).

(If you already use the new global `MathQuill()`-based API from the
`dev` branch, migrating to v0.10.0 should be just [one small change]
(https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide)
for you.)
`dev` branch, migrating to v0.10.0 should be just [one small change]
(https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide)
for you.)

**API-only changes:**

- (#336, #349, #351, #353) config options architecture
- (#308) don't auto-MathQuill-ify on jQuery `ready`
- (#297) prefix all CSS classes with `mq-`
- (#238, #272, #288, #337, #362, #459, #463, #495) kill jQuery plugin; new
global `MathQuill()` returns API objects

**typist-facing changes:**

- (#506) delete `\caret` and `\underscore`
- (#453) incremental backspace: backspacing into a compound command like
fraction or exponent goes left into it rather than selecting it
Expand All @@ -101,6 +108,7 @@ itself): See the [v0.9.x → v0.10.0 Migration Guide]
- (#157) stop fractions created by typing `/` at `,`/`;`/`:`

**new features:**

- (#468) add WOFF and WOFF2 font formats
- (#376, #398) add `autoSubscriptNumerals` option
- (#338) config option `sumStartsWithNEquals`
Expand All @@ -121,10 +129,12 @@ itself): See the [v0.9.x → v0.10.0 Migration Guide]
- (#151) `\textcolor{color}{math}`

**new build system features:**

- (#377) `OMIT_FONT_FACE=true make` omits `@font-face {...}`
- (#319) `make basic` builds stripped-down MathQuill for basic math

**bugfixes:**

- (#452) fix blinking blue cursor and autocorrect on iOS
- (#448) fix `\ddots` to be downward-rightward not upward-rightward
- (#432) fix quadratic-time fragment construction
Expand All @@ -148,12 +158,14 @@ itself): See the [v0.9.x → v0.10.0 Migration Guide]
- (c1fe1ef, 9aef35f) fix up/down in an `\editable{}` in a fraction

**docs:**

- (#485) add more metadata to package.json
- (#484) fix links in README
- (#393) correctly credit co-creator @jneen
- (#283) use Mozilla Public License (MPL) instead of LGPL

**internal refactors:**

- (#303) remove STIX font files, never used them
- (#244) refactor focus/blur out into its own service
- (#240) simplify `saneKeyboardEvents()` handlers pattern
Expand All @@ -172,36 +184,43 @@ _2014-1-22_
URGENT HOTFIX for cursor showing up as an ugly box in Chrome 40 (#371)

**bugfixes:**

- (#371) fix cursor showing up as an ugly box in Chrome 40
- (#230) fix selecting previously selected static math can't be copied
- (#217) fix no Array::indexOf in IE<9, use RegExp::test
- (#213) fix exception on up/down while something is selected
- (#211) fix CSS typo causing no italics when there should be

**build system changes:**

- (#222 and #228) `make server` auto-rebuilds without restarting server
- (#212) use empty target trick in Makefile

**docs:**

- (#283) change license from LGPL to Mozilla Public License

## v0.9.3: Fix `NZQRC` appearing double-struck/blackboard bold

_2013-11-11_

**new features:**

- (#185) add `\vec`

**bugfixes:**

- (#164) displaying `NZQRC` as `\mathbb{NZQRC}` (double-struck)
- (#180) can't type >1 spaces in `RootTextBlock`s
- (#190) `$` at the end of a `TextBlock` causes errors later
- (#152) when "Select All"-ed, `.mathquill('latex')` throws

**internal refactors:**

- rename `.end` and `.endChild` both to `.ends`

**build system changes:**

- fix `make publish` to work on BSD
- (#189) replace Connect with tiny handwritten static server
- upgrade to uglifyjs2
Expand All @@ -214,9 +233,11 @@ NOTE: The hotfix for typing over selections in Safari 5.1 (#135) from
v0.9.1 had a huge bug, fixed as #166.

**feature changes:**

- (#156) stop LiveFraction at commas/colons/semicolons

**bugfixes:**

- allow angle bracket as a VanillaSymbol (thanks @fpirsch!)
- (#166) fix selecting after paste
- (#121) editing `\text{...}` created from LaTeX
Expand All @@ -225,18 +246,20 @@ v0.9.1 had a huge bug, fixed as #166.
- stretched parens not being grayed

**internal refactors:**

- Massive renaming introducing direction constants `L` and `R`, and
directionalized methods
- Use a subclass of jQuery with directionalized methods (see `d5597e4`)

**build system changes:**

- New site-building system
- no more submodules, `npm` only

## v0.9.1: Hotfix for typing over selections in Safari 5.1

_2012-12-19_

* Started the changelog
* Added a `make publish` script
* Hotfix for typing over selections in Safari 5.1 (#135)
- Started the changelog
- Added a `make publish` script
- Hotfix for typing over selections in Safari 5.1 (#135)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ MathQuill is resuming active development and we're committed to getting things r
## Getting Started

MathQuill has a simple interface. This brief example creates a MathQuill element and renders, then reads a given input:

```javascript
var htmlElement = document.getElementById('some_id');
var config = {
Expand Down
9 changes: 4 additions & 5 deletions benchmark/render.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down Expand Up @@ -133,9 +133,8 @@ <h3>All MQ render times:</h3>
div.querySelector('.mq-result').innerText = `MQ: ${mqDuration.toFixed(
2
)} ms`;
div.querySelector(
'.html-result'
).innerText = `HTML: ${htmlDuration.toFixed(2)} ms`;
div.querySelector('.html-result').innerText =
`HTML: ${htmlDuration.toFixed(2)} ms`;
}

function printResults() {
Expand All @@ -156,7 +155,7 @@ <h3>All MQ render times:</h3>
[(a, b) => `${a}^{${b}}`, 2],
[(a, b) => `${a}_{${b}}`, 2],
[(...args) => `\\left[${args.join(',')}\\right]`, -1],
[(a) => `\\left(${a}\\right)`, 1],
[(a) => `\\left(${a}\\right)`, 1]
];

let [fn, arity] =
Expand Down
2 changes: 1 addition & 1 deletion benchmark/select.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion benchmark/update.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
Loading
Loading