Skip to content

Commit

Permalink
Merge pull request #450 from marp-team/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependent packages to the latest version
  • Loading branch information
yhatt authored May 23, 2022
2 parents 69772a9 + a8917b4 commit faf6218
Show file tree
Hide file tree
Showing 12 changed files with 1,092 additions and 1,051 deletions.
17 changes: 2 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ executors:
default: false
version:
type: string
default: '16.14' # Specify LTS major and minor for development
default: '16.15' # Specify LTS major and minor for development
docker:
- image: cimg/node:<< parameters.version >><<# parameters.browser >>-browsers<</ parameters.browser >>
working_directory: ~/marp-cli
Expand Down Expand Up @@ -178,20 +178,11 @@ jobs:
steps:
- audit

test-node12:
executor:
name: node
browser: true
version: '12.22'
steps:
- test:
browser: true

test-node14:
executor:
name: node
browser: true
version: '14.18'
version: '14.19'
steps:
- test:
browser: true
Expand Down Expand Up @@ -233,9 +224,6 @@ workflows:
jobs:
# Test
- audit
- test-node12:
requires:
- audit
- test-node14:
requires:
- audit
Expand All @@ -246,7 +234,6 @@ workflows:
# Docker (latest)
- docker-build-latest:
requires:
- test-node12
- test-node14
- test-node16
filters:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
# cancel-in-progress: true

env:
YARN_VERSION: '^1.22.17'
YARN_VERSION: '^1.22.19'

jobs:
win-test:
Expand All @@ -19,9 +19,8 @@ jobs:
fail-fast: false
matrix:
node-version:
- '^12.22.7'
- '^14.18.1'
- '16.14.2'
- '16.15.0'

steps:
# - name: Output concurrency group
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14.2
16.15.0
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,25 @@

## [Unreleased]

### ⚡️ Breaking

- End-of-Lifed Node.js 12 is no longer supported, and required the latest Node.js 14 and later ([#450](https://github.com/marp-team/marp-cli/pull/450))
- Upgrade Marp Core to [v3.2.0](https://github.com/marp-team/marp-core/releases/tag/v3.2.0) ([#450](https://github.com/marp-team/marp-cli/pull/450))
- This is the first version of using v3 core as a bundled engine. [Refer to major changes in Marp Core v3.0.0.](https://github.com/marp-team/marp-core/releases/tag/v3.0.0)

### Changed

- ⚡️ Updates of experimental transition for bespoke template `--bespoke.transition` ([#447](https://github.com/marp-team/marp-cli/issues/447), [#448](https://github.com/marp-team/marp-cli/pull/448))
- Upgrade Marpit to [v2.3.1](https://github.com/marp-team/marpit/releases/tag/v2.3.1) ([#450](https://github.com/marp-team/marp-cli/pull/450))
- Updates of experimental transition for bespoke template `--bespoke.transition` ([#447](https://github.com/marp-team/marp-cli/issues/447), [#448](https://github.com/marp-team/marp-cli/pull/448))
- More built-in transitions (5 transitions -> 33 transitions)
- Define custom transitions by `@keyframes` declaration in CSS
- Update spec of `transition` local directive
- Opt-out transition animation by preferring `prefers-reduced-motion` media query

### Deprecated

- [Marpit v2.3.0](https://github.com/marp-team/marpit/releases/tag/v2.3.0): Shorthand syntax for setting colors `![](red)` has been deprecated ([#450](https://github.com/marp-team/marp-cli/pull/450))

## v1.7.2 - 2022-04-24

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.14.2-alpine
FROM node:16.15.0-alpine
LABEL maintainer "Marp team"

RUN apk update && apk upgrade && \
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It can convert Marp / Marpit Markdown files into static HTML / CSS, PDF, PowerPo

[npx (`npm exec`)](https://docs.npmjs.com/cli/v7/commands/npx) is the best way to use the latest Marp CLI if you wanted
one-shot Markdown conversion _without install_. Just run below if you have
installed [Node.js](https://nodejs.org/) 12 and later.
installed [Node.js](https://nodejs.org/) 14 and later.

```bash
# Convert slide deck into HTML
Expand Down Expand Up @@ -59,6 +59,8 @@ Don't you like installing Node.js and Chrome to local? We have [an official Dock

## Install

Marp CLI is working only in [actively supported Node.js versions](https://endoflife.date/nodejs) so Node.js 14 and later is required to install.

### Use package manager

You can use the package manager to install/update Marp CLI easily.
Expand All @@ -79,7 +81,7 @@ We recommend to install Marp CLI into your Node project. You may control the CLI
npm install --save-dev @marp-team/marp-cli
```

Node.js 12 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`.
The installed `marp` command is available in [npm-scripts](https://docs.npmjs.com/misc/scripts) or `npx marp`.

#### Global installation

Expand All @@ -91,7 +93,7 @@ npm install -g @marp-team/marp-cli

### [Standalone binary][releases]

We also provide standalone binaries for Linux, macOS, and Windows.
We also provide standalone binaries for Linux, macOS, and Windows. These have bundled Marp CLI with Node.js binary, so no need to install Node.js separately.

**[:fast_forward: Download the latest standalone binary from release page.][releases]**

Expand Down Expand Up @@ -437,9 +439,9 @@ Marp CLI prefers to use _an installed core to local project by user_ than the bu
If the current project has installed `@marp-team/marp-core` individually, it would show its version and the annotation: `w/ user-installed @marp-team/marp-core vX.X.X` or `w/ customized engine`.

```console
$ npm i @marp-team/marp-cli @marp-team/marp-core@^3.0.0 --save-dev
$ npm i @marp-team/marp-cli @marp-team/marp-core@^3.2.0 --save-dev
$ npx marp --version
@marp-team/marp-cli v1.x.x (w/ user-installed @marp-team/marp-core v3.0.0)
@marp-team/marp-cli v2.x.x (w/ user-installed @marp-team/marp-core v3.2.0)
```

## Configuration file
Expand Down
69 changes: 34 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"url": "https://github.com/marp-team/marp-cli"
},
"engines": {
"node": ">=12"
"node": "^14.13.1 || >=16"
},
"main": "lib/index.js",
"types": "types/src/index.d.ts",
Expand Down Expand Up @@ -67,99 +67,98 @@
"watch": "rollup -w -c"
},
"devDependencies": {
"@babel/preset-env": "^7.16.11",
"@babel/preset-env": "^7.18.0",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^21.0.3",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.2.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-typescript": "^8.3.1",
"@rollup/plugin-url": "^6.1.0",
"@tsconfig/node12": "^1.0.9",
"@rollup/plugin-typescript": "^8.3.2",
"@rollup/plugin-url": "^7.0.0",
"@tsconfig/node14": "^1.0.1",
"@types/cheerio": "^0.22.31",
"@types/express": "^4.17.13",
"@types/jest": "^27.5.1",
"@types/markdown-it": "^12.2.3",
"@types/node": "~16.11.25",
"@types/node": "~16.11.36",
"@types/pug": "^2.0.6",
"@types/supertest": "^2.0.12",
"@types/ws": "^8.5.3",
"@types/yargs": "^17.0.10",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"autoprefixer": "^10.4.4",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"autoprefixer": "^10.4.7",
"babel-plugin-transform-rename-import": "^2.3.0",
"bespoke": "bespokejs/bespoke",
"builtin-modules": "^3.2.0",
"builtin-modules": "^3.3.0",
"chalk": "^5.0.1",
"cheerio": "^1.0.0-rc.10",
"cheerio": "^1.0.0-rc.11",
"chrome-launcher": "^0.15.0",
"cssnano": "^5.1.7",
"eslint": "^8.13.0",
"cssnano": "^5.1.9",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.4",
"express": "^4.17.3",
"eslint-plugin-jest": "^26.2.2",
"express": "^4.18.1",
"get-stdin": "^9.0.0",
"globby": "^13.1.1",
"image-size": "^1.0.1",
"is-docker": "^3.0.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest-junit": "^13.1.0",
"nanoid": "^3.3.2",
"jest-junit": "^13.2.0",
"nanoid": "^3.3.4",
"npm-run-all": "^4.1.5",
"os-locale": "^6.0.2",
"pdf-lib": "^1.17.1",
"pkg": "^5.6.0",
"pkg": "^5.7.0",
"pkg-up": "^4.0.0",
"portfinder": "^1.0.28",
"postcss": "^8.4.6",
"postcss": "^8.4.14",
"postcss-url": "^10.1.3",
"pptxgenjs": "^3.10.0",
"prettier": "^2.6.2",
"pug": "^3.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.70.1",
"rollup-plugin-license": "^2.6.1",
"rollup": "^2.74.1",
"rollup-plugin-license": "^2.7.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-pug": "^1.1.1",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.50.0",
"sass": "^1.52.1",
"strip-ansi": "^7.0.1",
"stylelint": "^14.6.1",
"stylelint": "^14.8.3",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard-scss": "^3.0.0",
"supertest": "^6.2.2",
"supertest": "^6.2.3",
"tar-stream": "^2.2.0",
"ts-jest": "^28.0.2",
"ts-key-enum": "^3.0.11",
"tslib": "^2.3.1",
"tslib": "^2.4.0",
"typed-emitter": "^2.1.0",
"typescript": "^4.6.3",
"typescript": "^4.6.4",
"vhtml": "^2.2.0",
"wrap-ansi": "^8.0.1",
"yauzl": "^2.10.0",
"zip-stream": "^4.1.0"
},
"dependencies": {
"@marp-team/marp-core": "^2.4.2",
"@marp-team/marpit": "^2.2.4",
"@marp-team/marp-core": "^3.2.0",
"@marp-team/marpit": "^2.3.1",
"chokidar": "^3.5.3",
"cosmiconfig": "^7.0.1",
"import-from": "^4.0.0",
"is-wsl": "^2.2.0",
"puppeteer-core": "13.6.0",
"puppeteer-core": "14.1.1",
"serve-index": "^1.9.1",
"tmp": "^0.2.1",
"v8-compile-cache": "^2.3.0",
"ws": "^8.5.0",
"yargs": "^17.4.1"
"ws": "^8.6.0",
"yargs": "^17.5.1"
},
"resolutions": {
"pug": "^3.0.2",
"pug-runtime": "^3.0.1",
"rollup-plugin-license/moment": "^2.29.2"
"pug-runtime": "^3.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
11 changes: 9 additions & 2 deletions src/templates/bespoke/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ const bespokeLoad = (deck) => {
for (const slide of deck.slides) {
// Slides contained Marp Core's fitting elements must not hide via `display: none;`.
// https://github.com/marp-team/marp-cli/issues/153
const type = slide.querySelector('[data-marp-fitting]') ? '' : 'hideable'
//
// NOTE: [data-marp-fitting] is used by Marp Core v2
const hasFittingElement = slide.querySelector(
'marp-auto-scaling, [data-auto-scaling], [data-marp-fitting]'
)

slide.setAttribute(`${dataAttrPrefix}load`, type)
slide.setAttribute(
`${dataAttrPrefix}load`,
hasFittingElement ? '' : 'hideable'
)
}
})
}
Expand Down
6 changes: 3 additions & 3 deletions test/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { URL } from 'url'
import { promisify } from 'util'
import { Marp } from '@marp-team/marp-core'
import { Options } from '@marp-team/marpit'
import cheerio, { load } from 'cheerio'
import { load } from 'cheerio'
import { imageSize } from 'image-size'
import { PDFDocument, PDFDict, PDFName, PDFHexString } from 'pdf-lib'
import { TimeoutError } from 'puppeteer-core'
import { Page } from 'puppeteer-core/lib/cjs/puppeteer/common/Page'
import { Page } from 'puppeteer-core/lib/cjs/puppeteer/common/Page.js'
import yauzl from 'yauzl'
import { Converter, ConvertType, ConverterOption } from '../src/converter'
import { CLIError } from '../src/error'
Expand Down Expand Up @@ -653,7 +653,7 @@ describe('Converter', () => {

readStream.on('data', (chunk) => readBuffer.push(chunk))
readStream.on('end', () => {
const $ = cheerio.load(Buffer.concat(readBuffer).toString())
const $ = load(Buffer.concat(readBuffer).toString())
const coreProps = $('cp\\:coreProperties')

coreProps.children().each((_, elm) => {
Expand Down
6 changes: 3 additions & 3 deletions test/server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path'
import Marp from '@marp-team/marp-core'
import cheerio from 'cheerio'
import { load } from 'cheerio'
import express from 'express'
import request from 'supertest'
import {
Expand Down Expand Up @@ -211,7 +211,7 @@ describe('Server', () => {
const response = await request(server.server).get('/')
expect(response.status).toBe(200)

const $ = cheerio.load(response.text)
const $ = load(response.text)
expect($('h1').text()).toBe('/')
expect($('ul#index li')).toHaveLength(9) // Actual file count
expect($('ul#index li.directory')).toHaveLength(5) // Directories
Expand All @@ -230,7 +230,7 @@ describe('Server', () => {

expect(response.status).toBe(200)

const $ = cheerio.load(response.text)
const $ = load(response.text)
expect($('h1').text()).toBe('one')
})
})
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@tsconfig/node12/tsconfig.json",
"extends": "@tsconfig/node14/tsconfig.json",
"compilerOptions": {
"jsx": "react",
"lib": [
Expand Down
Loading

0 comments on commit faf6218

Please sign in to comment.