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 Node.js and dependent packages to the latest version #523

Merged
merged 5 commits into from
Jun 10, 2023
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
17 changes: 2 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ executors:
default: false
version:
type: string
default: '18.14.1' # Specify LTS major and minor for development
default: '18.16.0' # Specify LTS major and minor for development
docker:
- image: cimg/node:<< parameters.version >><<# parameters.browser >>-browsers<</ parameters.browser >>
working_directory: ~/marp-cli

docker:
machine:
image: ubuntu-2004:202111-02
image: ubuntu-2204:2023.04.2
docker_layer_caching: true
working_directory: ~/marp-cli
environment:
Expand Down Expand Up @@ -178,15 +178,6 @@ jobs:
steps:
- audit

test-node14:
executor:
name: node
browser: true
version: '14.21'
steps:
- test:
browser: true

test-node16:
executor:
name: node
Expand Down Expand Up @@ -233,9 +224,6 @@ workflows:
jobs:
# Test
- audit
- test-node14:
requires:
- audit
- test-node16:
requires:
- audit
Expand All @@ -246,7 +234,6 @@ workflows:
# Docker (latest)
- docker-build-latest:
requires:
- test-node14
- test-node16
- test-node18
filters:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
fail-fast: false
matrix:
node-version:
- '^14.21.1'
- '^16.18.1'
- '18.14.1'
- '18.16.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 @@
18.14.1
18.16.0
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,24 @@

## [Unreleased]

### Breaking

- End-of-Lifed Node.js 14 is no longer supported, and required the latest Node.js 16 and later ([#523](https://github.com/marp-team/marp-cli/pull/523))

### Added

- Support ES Modules and async resolution for engine script ([#521](https://github.com/marp-team/marp-cli/pull/521))

### Changed

- Upgrade Marp Core to [v3.7.0](https://github.com/marp-team/marp-core/releases/v3.7.0) ([#523](https://github.com/marp-team/marp-cli/pull/523))
- Upgrade Marpit to [v2.5.0](https://github.com/marp-team/marpit/releases/tag/v2.5.0) ([#523](https://github.com/marp-team/marp-cli/pull/523))
- Added `paginate: skip` and `paginate: hold`

### Fixed

- Time out of conversion powered by Chromium in v2.5.0 Docker image ([#520](https://github.com/marp-team/marp-cli/issues/520))

## v2.5.0 - 2023-04-16

### Added
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:18.14.1-alpine
FROM node:18.16.0-alpine
LABEL maintainer "Marp team"

RUN apk update && apk upgrade && \
Expand Down
4 changes: 2 additions & 2 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/) 14 and later.
installed [Node.js](https://nodejs.org/) v16 and later.

```bash
# Convert slide deck into HTML
Expand Down Expand Up @@ -87,7 +87,7 @@ scoop install marp

We recommend to install Marp CLI into your Node.js project. You may control the CLI version (and engine if you want) exactly.

> :information_source: Marp CLI is working only with [actively supported Node.js versions](https://endoflife.date/nodejs), so Node.js 14 and later is required when installing into your Node.js project.
> :information_source: Marp CLI is working only with [actively supported Node.js versions](https://endoflife.date/nodejs), so Node.js v16 and later is required when installing into your Node.js project.

```bash
npm install --save-dev @marp-team/marp-cli
Expand Down
60 changes: 30 additions & 30 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": "^14.13.1 || >=16"
"node": ">=16"
},
"main": "lib/index.js",
"types": "types/src/index.d.ts",
Expand Down Expand Up @@ -67,37 +67,37 @@
"watch": "rollup -w -c"
},
"devDependencies": {
"@babel/preset-env": "^7.21.4",
"@babel/preset-env": "^7.22.5",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-commonjs": "^25.0.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-typescript": "^11.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.1",
"@rollup/plugin-url": "^8.0.1",
"@tsconfig/node14": "^1.0.3",
"@types/cheerio": "^0.22.31",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.0",
"@types/jest": "^29.5.2",
"@types/markdown-it": "^12.2.3",
"@types/node": "~18.15.11",
"@types/node": "~16.18.35",
"@types/pug": "^2.0.6",
"@types/supertest": "^2.0.12",
"@types/ws": "^8.5.4",
"@types/ws": "^8.5.5",
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"autoprefixer": "^10.4.14",
"babel-plugin-transform-rename-import": "^2.3.0",
"bespoke": "bespokejs/bespoke",
"builtin-modules": "^3.3.0",
"chalk": "^5.2.0",
"cheerio": "^1.0.0-rc.12",
"chrome-launcher": "^0.15.1",
"chrome-launcher": "^0.15.2",
"css.escape": "^1.5.1",
"cssnano": "^6.0.0",
"eslint": "^8.38.0",
"cssnano": "^6.0.1",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-exports": "^1.0.0-beta.5",
"eslint-import-resolver-typescript": "^3.5.5",
Expand All @@ -108,7 +108,7 @@
"get-stdin": "^9.0.0",
"globby": "^13.1.4",
"image-size": "^1.0.2",
"import-meta-resolve": "^2.2.2",
"import-meta-resolve": "^3.0.0",
"is-docker": "^3.0.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
Expand All @@ -120,44 +120,44 @@
"pkg": "^5.8.1",
"pkg-up": "^4.0.0",
"portfinder": "1.0.32",
"postcss": "^8.4.21",
"postcss": "^8.4.24",
"postcss-url": "^10.1.3",
"pptxgenjs": "^3.12.0",
"prettier": "^2.8.7",
"prettier": "^2.8.8",
"pug": "^3.0.2",
"rimraf": "^5.0.0",
"rollup": "^3.20.2",
"rimraf": "^5.0.1",
"rollup": "^3.24.1",
"rollup-plugin-license": "^3.0.1",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-pug": "^1.1.1",
"sass": "^1.62.0",
"strip-ansi": "^7.0.1",
"stylelint": "^15.5.0",
"stylelint-config-standard-scss": "^8.0.0",
"sass": "^1.63.3",
"strip-ansi": "^7.1.0",
"stylelint": "^15.7.0",
"stylelint-config-standard-scss": "^9.0.0",
"supertest": "^6.3.3",
"tar-stream": "^3.0.0",
"ts-jest": "^29.1.0",
"ts-key-enum": "^3.0.12",
"tslib": "^2.5.0",
"tslib": "^2.5.3",
"typed-emitter": "^2.1.0",
"typescript": "^5.0.4",
"typescript": "^5.1.3",
"vhtml": "^2.2.0",
"wrap-ansi": "^8.1.0",
"yauzl": "^2.10.0",
"zip-stream": "^4.1.0"
},
"dependencies": {
"@marp-team/marp-core": "^3.6.0",
"@marp-team/marpit": "^2.4.2",
"@marp-team/marp-core": "^3.7.0",
"@marp-team/marpit": "^2.5.0",
"chokidar": "^3.5.3",
"cosmiconfig": "^8.1.3",
"cosmiconfig": "~8.1.3",
"is-wsl": "^2.2.0",
"puppeteer-core": "19.9.0",
"puppeteer-core": "20.5.0",
"remove": "^0.1.5",
"serve-index": "^1.9.1",
"tmp": "^0.2.1",
"ws": "^8.13.0",
"yargs": "^17.7.1"
"yargs": "^17.7.2"
},
"resolutions": {
"pug": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const _silentImport = async <T = any>(
}

try {
const resolved = await importMetaResolve(
const resolved = importMetaResolve(
moduleId,
url.pathToFileURL(basePath).toString()
)
Expand Down
6 changes: 4 additions & 2 deletions test/templates/bespoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1499,13 +1499,15 @@ describe("Bespoke template's browser context", () => {

request.mockReset().mockResolvedValue(wakeLockObj)
wakeLockObj.addEventListener.mockReset()
navigator['wakeLock'] = { request }
;(navigator as any).wakeLock = {
request,
}

_clearCachedWakeLockApi()
render()
})

afterEach(() => delete navigator['wakeLock'])
afterEach(() => delete (navigator as any).wakeLock)

it('calls requestWakeLock() in wake-lock plugin if Screen Wake Lock API is available', () => {
expect(request).not.toHaveBeenCalled()
Expand Down
Loading