Skip to content

Commit 89ff4b4

Browse files
authored
Merge pull request #365 from marp-team/upgrade-dependencies
Upgrade dependent packages to the latest
2 parents ca10ae9 + ca0c5eb commit 89ff4b4

File tree

15 files changed

+2259
-3069
lines changed

15 files changed

+2259
-3069
lines changed

.circleci/config.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,25 @@ jobs:
158158
executor:
159159
name: node
160160
browser: true
161-
version: '12'
161+
version: '12.22'
162162
steps:
163163
- test
164164

165165
test-node14:
166166
executor:
167167
name: node
168168
browser: true
169-
version: '14.16.1' # Specify LTS version for development
169+
version: '14.17.3' # Specify LTS version for development
170170
steps:
171171
- test
172172

173-
# test-node16:
174-
# executor:
175-
# name: node
176-
# browser: true
177-
# version: '16'
178-
# steps:
179-
# - test
173+
test-node16:
174+
executor:
175+
name: node
176+
browser: true
177+
version: '16.5'
178+
steps:
179+
- test
180180

181181
docker-image-latest:
182182
executor: docker
@@ -202,14 +202,14 @@ workflows:
202202
- test-node14:
203203
requires:
204204
- audit
205-
# - test-node16:
206-
# requires:
207-
# - audit
205+
- test-node16:
206+
requires:
207+
- audit
208208
- docker-image-latest:
209209
requires:
210210
- test-node12
211211
- test-node14
212-
# - test-node16
212+
- test-node16
213213
filters:
214214
branches:
215215
only: main

.github/workflows/test-win.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
node-version:
1818
- '^12.20.0'
19-
- '14.16.1'
19+
- '14.17.3'
2020
- '^16.0.0'
2121

2222
steps:
@@ -45,8 +45,13 @@ jobs:
4545
- name: Install dependencies with yarn
4646
run: yarn install
4747

48+
# Retry tests up to 3 times due to flaky tests on Windows CI
49+
# https://stackoverflow.com/a/59365905
4850
- name: Jest
49-
run: yarn test:coverage --ci -i --reporters=default --reporters=jest-junit
51+
run: >-
52+
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit ||
53+
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --no-cache ||
54+
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --no-cache
5055
env:
5156
CI: true
5257

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.16.1
1+
14.17.3

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22

33
## [Unreleased]
44

5+
### Breaking
6+
7+
- Now required Node.js 12.20 and later ([#365](https://github.com/marp-team/marp-cli/pull/365))
8+
59
### Added
610

711
- Installation guide for Homebrew ([#353](https://github.com/marp-team/marp-cli/pull/353))
8-
- Mention Node.js >= 12 requirement in README ([#359](https://github.com/marp-team/marp-cli/issues/359), [#361](https://github.com/marp-team/marp-cli/pull/361) by [@jlevon](https://github.com/jlevon))
12+
- Mention Node.js >= 12.20 requirement in README ([#359](https://github.com/marp-team/marp-cli/issues/359), [#361](https://github.com/marp-team/marp-cli/pull/361) by [@jlevon](https://github.com/jlevon), [#365](https://github.com/marp-team/marp-cli/pull/365))
13+
14+
### Changed
15+
16+
- Upgrade Marpit to [v2.1.0](https://github.com/marp-team/marpit/releases/tag/v2.1.0) ([#365](https://github.com/marp-team/marp-cli/pull/365))
17+
- Follow the latest [CommonMark spec 0.30](https://spec.commonmark.org/0.30/)
18+
- Upgrade Marp Core to [v2.1.0](https://github.com/marp-team/marp-core/releases/tag/v2.1.0) ([#365](https://github.com/marp-team/marp-cli/pull/365))
19+
- [`math` global directive](https://github.com/marp-team/marp-core#math-global-directive) for switching math typesetting library in current Markdown
20+
- Upgrade dependent packages to the latest ([#365](https://github.com/marp-team/marp-cli/pull/365))
921

1022
### Removed
1123

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14.16.1-alpine
1+
FROM node:14.17.3-alpine
22
LABEL maintainer "Marp team"
33

44
RUN apk update && apk upgrade && \

README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,28 @@ It can convert Marp / Marpit Markdown files into static HTML / CSS, PDF, PowerPo
1919

2020
### npx
2121

22-
[npx](https://docs.npmjs.com/cli/v7/commands/npx) is the best way if you wanted
23-
one-shot Markdown conversion without install. Just run below if you have
24-
installed [Node.js](https://nodejs.org/). Only Node.js version 12 or higher
25-
works.
22+
[npx (`npm exec`)](https://docs.npmjs.com/cli/v7/commands/npx) is the best way to use the latest Marp CLI if you wanted
23+
one-shot Markdown conversion _without install_. Just run below if you have
24+
installed [Node.js](https://nodejs.org/) 12.20 and later.
2625

2726
```bash
2827
# Convert slide deck into HTML
29-
npx @marp-team/marp-cli slide-deck.md
30-
npx @marp-team/marp-cli slide-deck.md -o output.html
28+
npx @marp-team/marp-cli@latest slide-deck.md
29+
npx @marp-team/marp-cli@latest slide-deck.md -o output.html
3130

3231
# Convert slide deck into PDF
33-
npx @marp-team/marp-cli slide-deck.md --pdf
34-
npx @marp-team/marp-cli slide-deck.md -o output.pdf
32+
npx @marp-team/marp-cli@latest slide-deck.md --pdf
33+
npx @marp-team/marp-cli@latest slide-deck.md -o output.pdf
3534

3635
# Convert slide deck into PowerPoint document (PPTX)
37-
npx @marp-team/marp-cli slide-deck.md --pptx
38-
npx @marp-team/marp-cli slide-deck.md -o output.pptx
36+
npx @marp-team/marp-cli@latest slide-deck.md --pptx
37+
npx @marp-team/marp-cli@latest slide-deck.md -o output.pptx
3938

4039
# Watch mode
41-
npx @marp-team/marp-cli -w slide-deck.md
40+
npx @marp-team/marp-cli@latest -w slide-deck.md
4241

4342
# Server mode (Pass directory to serve)
44-
npx @marp-team/marp-cli -s ./slides
43+
npx @marp-team/marp-cli@latest -s ./slides
4544
```
4645

4746
> :information_source: You have to install [Google Chrome], [Chromium], or [Microsoft Edge] to convert slide deck into PDF, PPTX, and image(s).
@@ -60,6 +59,18 @@ Do you hate to install Node and Chrome locally? We have [an official Docker imag
6059

6160
## Install
6261

62+
### Use package manager
63+
64+
You can use the package manager to install/update Marp CLI easily.
65+
66+
- **macOS**
67+
- **[Homebrew](https://brew.sh/)**: `brew install marp-cli` ([Refer to the formula...](https://github.com/Homebrew/homebrew-core/blob/master/Formula/marp-cli.rb))
68+
69+
* **Windows**
70+
- **[Scoop](https://scoop.sh/)**: `scoop install marp` ([Refer to the manifest in Main bucket...](https://github.com/ScoopInstaller/Main/blob/master/bucket/marp.json))
71+
72+
_Disclaimer: Package manifests are maintained by the community, not Marp team._
73+
6374
### Local installation
6475

6576
We recommend to install Marp CLI into your Node project. You may control the CLI (and engine) version exactly.
@@ -68,7 +79,7 @@ We recommend to install Marp CLI into your Node project. You may control the CLI
6879
npm install --save-dev @marp-team/marp-cli
6980
```
7081

71-
The installed `marp` command is available in [npm-scripts](https://docs.npmjs.com/misc/scripts) or `npx marp`.
82+
Node.js 12.20 and later is required to install Marp CLI. The installed `marp` command is available in [npm-scripts](https://docs.npmjs.com/misc/scripts) or `npx marp`.
7283

7384
#### Global installation
7485

@@ -78,18 +89,6 @@ You can install with `-g` option if you want to use `marp` command globally.
7889
npm install -g @marp-team/marp-cli
7990
```
8091

81-
### Use package manager
82-
83-
You can use the package manager to install/update Marp CLI easily.
84-
85-
- **macOS**
86-
- **[Homebrew](https://brew.sh/)**: `brew install marp-cli` ([Refer to the formula...](https://github.com/Homebrew/homebrew-core/blob/master/Formula/marp-cli.rb))
87-
88-
* **Windows**
89-
- **[Scoop](https://scoop.sh/)**: `scoop install marp` ([Refer to the manifest in Main bucket...](https://github.com/ScoopInstaller/Main/blob/master/bucket/marp.json))
90-
91-
_Disclaimer: Package manifests are maintained by the community, not Marp team._
92-
9392
### [Standalone binary][releases]
9493

9594
We also provide standalone binaries for Linux, macOS, and Windows.

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// This setting is used only to transform ESM while running Jest.
22
module.exports = {
33
presets: [['@babel/env', { targets: { node: 'current' } }]],
4+
plugins: [
5+
['transform-rename-import', { original: '^node:(.+)$', replacement: '$1' }],
6+
],
47
}

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { jsWithBabel } = require('ts-jest/presets')
22

3-
const esModules = ['ansi-regex', 'strip-ansi']
3+
const esModules = ['ansi-regex', 'array-union', 'globby', 'slash', 'strip-ansi']
44

55
module.exports = {
66
collectCoverageFrom: ['src/**/*.ts', 'src/**/*.tsx'],

package.json

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"url": "https://github.com/marp-team/marp-cli"
2727
},
2828
"engines": {
29-
"node": ">=12"
29+
"node": ">=12.20"
3030
},
3131
"main": "lib/index.js",
3232
"types": "types/src/index.d.ts",
@@ -44,7 +44,7 @@
4444
"scripts": {
4545
"build": "yarn -s clean && rollup -c",
4646
"build:standalone": "run-s build standalone",
47-
"check:audit": "echo \"[WARNING] Temporally limited yarn audit only to dependencies: https://github.com/marp-team/marp-cli/pull/347\" && yarn audit --groups dependencies",
47+
"check:audit": "yarn audit",
4848
"check:format": "yarn -s format -c",
4949
"check:ts": "tsc --noEmit",
5050
"clean": "rimraf lib",
@@ -63,92 +63,93 @@
6363
"watch": "rollup -w -c"
6464
},
6565
"devDependencies": {
66-
"@babel/preset-env": "^7.14.2",
67-
"@rollup/plugin-commonjs": "^19.0.0",
66+
"@babel/preset-env": "^7.14.8",
67+
"@rollup/plugin-commonjs": "^19.0.1",
6868
"@rollup/plugin-json": "^4.1.0",
69-
"@rollup/plugin-node-resolve": "^13.0.0",
70-
"@rollup/plugin-replace": "^2.4.2",
71-
"@rollup/plugin-typescript": "^8.2.1",
69+
"@rollup/plugin-node-resolve": "^13.0.2",
70+
"@rollup/plugin-replace": "^3.0.0",
71+
"@rollup/plugin-typescript": "^8.2.3",
7272
"@rollup/plugin-url": "^6.0.0",
73-
"@types/cheerio": "^0.22.28",
74-
"@types/express": "^4.17.11",
75-
"@types/jest": "^26.0.23",
76-
"@types/node": "~14.14.45",
77-
"@types/pug": "^2.0.4",
73+
"@types/cheerio": "^0.22.30",
74+
"@types/express": "^4.17.13",
75+
"@types/jest": "^26.0.24",
76+
"@types/node": "~14.17.5",
77+
"@types/pug": "^2.0.5",
7878
"@types/supertest": "^2.0.11",
79-
"@types/ws": "^7.4.4",
80-
"@types/yargs": "^16.0.1",
81-
"@typescript-eslint/eslint-plugin": "^4.24.0",
82-
"@typescript-eslint/parser": "^4.24.0",
83-
"autoprefixer": "^10.2.5",
79+
"@types/ws": "^7.4.7",
80+
"@types/yargs": "^17.0.2",
81+
"@typescript-eslint/eslint-plugin": "^4.28.4",
82+
"@typescript-eslint/parser": "^4.28.4",
83+
"autoprefixer": "^10.3.1",
84+
"babel-plugin-transform-rename-import": "^2.3.0",
8485
"bespoke": "bespokejs/bespoke",
8586
"builtin-modules": "^3.2.0",
8687
"chalk": "^4.1.1",
87-
"cheerio": "^1.0.0-rc.9",
88-
"codecov": "^3.8.2",
89-
"cssnano": "^5.0.2",
90-
"eslint": "^7.26.0",
88+
"cheerio": "^1.0.0-rc.10",
89+
"codecov": "^3.8.3",
90+
"cssnano": "^5.0.7",
91+
"eslint": "^7.31.0",
9192
"eslint-config-prettier": "^8.3.0",
92-
"eslint-plugin-import": "^2.23.2",
93-
"eslint-plugin-jest": "^24.3.6",
93+
"eslint-plugin-import": "^2.23.4",
94+
"eslint-plugin-jest": "^24.4.0",
9495
"get-stdin": "^9.0.0",
96+
"globby": "^12.0.0",
9597
"image-size": "^1.0.0",
9698
"is-wsl": "^2.2.0",
97-
"jest": "^26.6.3",
98-
"jest-junit": "^12.0.0",
99+
"jest": "^27.0.6",
100+
"jest-junit": "^12.2.0",
99101
"nanoid": "^3.1.23",
100102
"npm-run-all": "^4.1.5",
101103
"os-locale": "^5.0.0",
102-
"pkg": "^5.1.0",
104+
"pkg": "^5.3.1",
103105
"pkg-up": "^3.1.0",
104106
"portfinder": "^1.0.28",
105-
"postcss": "^8.2.15",
107+
"postcss": "^8.3.6",
106108
"postcss-url": "^10.1.3",
107-
"prettier": "^2.3.0",
109+
"prettier": "^2.3.2",
108110
"pug": "^3.0.2",
109111
"rimraf": "^3.0.2",
110-
"rollup": "^2.48.0",
111-
"rollup-plugin-license": "^2.3.0",
112+
"rollup": "^2.53.3",
113+
"rollup-plugin-license": "^2.5.0",
112114
"rollup-plugin-postcss": "^4.0.0",
113115
"rollup-plugin-pug": "^1.1.1",
114116
"rollup-plugin-terser": "^7.0.2",
115-
"sass": "^1.32.13",
117+
"sass": "^1.35.2",
116118
"screenfull": "^5.1.0",
117119
"strip-ansi": "^7.0.0",
118120
"stylelint": "^13.13.1",
119121
"stylelint-config-prettier": "^8.0.2",
120122
"stylelint-config-standard": "^22.0.0",
121-
"stylelint-scss": "^3.19.0",
122-
"supertest": "^6.1.3",
123+
"stylelint-scss": "^3.20.1",
124+
"supertest": "^6.1.4",
123125
"tar-stream": "^2.2.0",
124-
"ts-jest": "^26.5.6",
126+
"ts-jest": "^27.0.4",
125127
"ts-key-enum": "^2.0.7",
126-
"tslib": "^2.2.0",
127-
"typescript": "^4.2.4",
128+
"tslib": "^2.3.0",
129+
"typescript": "^4.3.5",
128130
"vhtml": "^2.2.0",
129131
"wrap-ansi": "^8.0.0",
130132
"yauzl": "^2.10.0",
131133
"zip-stream": "^4.1.0"
132134
},
133135
"dependencies": {
134-
"@marp-team/marp-core": "^2.0.3",
135-
"@marp-team/marpit": "^2.0.1",
136-
"chokidar": "^3.5.1",
137-
"chrome-launcher": "^0.13.4",
136+
"@marp-team/marp-core": "^2.1.0",
137+
"@marp-team/marpit": "^2.1.0",
138+
"chokidar": "^3.5.2",
139+
"chrome-launcher": "^0.14.0",
138140
"cosmiconfig": "^7.0.0",
139141
"express": "^4.17.1",
140-
"globby": "^11.0.3",
141-
"import-from": "^3.0.0",
142-
"pptxgenjs": "^3.6.0",
143-
"puppeteer-core": "9.1.1",
142+
"import-from": "^4.0.0",
143+
"pptxgenjs": "^3.7.1",
144+
"puppeteer-core": "10.1.0",
144145
"serve-index": "^1.9.1",
145146
"tmp": "^0.2.1",
146147
"v8-compile-cache": "^2.3.0",
147-
"ws": "^7.4.6",
148+
"ws": "^7.5.3",
148149
"yargs": "^17.0.1"
149150
},
150151
"resolutions": {
151-
"cssnano": "^5.0.2",
152+
"cssnano": "^5.0.7",
152153
"pug": "^3.0.2",
153154
"pug-runtime": "^3.0.1"
154155
},

rollup.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ const browser = (opts = {}) => ({
6565
})
6666

6767
const cli = {
68-
external: external([...builtinModules, ...Object.keys(dependencies)]),
68+
external: external([
69+
...builtinModules,
70+
...builtinModules.map((m) => `node:${m}`),
71+
...Object.keys(dependencies),
72+
]),
6973
plugins: plugins(),
7074
}
7175

src/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from 'path'
55
import * as url from 'url'
66
import { promisify } from 'util'
77
import getStdin from 'get-stdin'
8-
import globby, { GlobbyOptions } from 'globby'
8+
import { globby, Options as GlobbyOptions } from 'globby'
99
import { tmpName } from 'tmp'
1010

1111
const tmpNamePromise = promisify(tmpName)

0 commit comments

Comments
 (0)