Skip to content

Upgrade dependent packages to the latest version #657

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

Merged
merged 9 commits into from
May 17, 2025
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]

### Changed

- Upgrade Marpit to [v3.1.3](https://github.com/marp-team/marpit/releases/tag/v3.1.3) ([#654](https://github.com/marp-team/marp-cli/pull/654), [#657](https://github.com/marp-team/marp-cli/pull/657))
- Upgrade Marp Core to [v4.1.0](https://github.com/marp-team/marp-core/releases/v4.1.0) ([#657](https://github.com/marp-team/marp-cli/pull/657))
- Transform Unicode 16 emojis into Twemoji images by default
- Upgrade dependent packages to the latest version ([#657](https://github.com/marp-team/marp-cli/pull/657))

## v4.1.2 - 2025-02-21

### Added
Expand Down
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const esModules = [
'path-exists',
'path-type',
'package-up',
'pptxgenjs',
'slash',
'strip-ansi',
'unicorn-magic',
Expand All @@ -39,6 +40,7 @@ module.exports = {
setupFiles: ['./jest.setup.js'],
transform: {
...jsWithBabel.transform,
'_configs[/\\\\].+\\.mjs$': 'babel-jest',
'\\.s?css$': '<rootDir>/test/_transformers/css.js',
'\\.png$': '<rootDir>/test/_transformers/png.js',
'\\.pug$': '<rootDir>/test/_transformers/pug.js',
Expand Down
4,756 changes: 2,207 additions & 2,549 deletions package-lock.json

Large diffs are not rendered by default.

88 changes: 43 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,101 +67,99 @@
"watch": "rollup -w -c"
},
"devDependencies": {
"@babel/preset-env": "^7.26.9",
"@formatjs/intl-segmenter": "^11.7.9",
"@babel/preset-env": "^7.27.2",
"@formatjs/intl-segmenter": "^11.7.10",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.2",
"@rollup/plugin-url": "^8.0.2",
"@tsconfig/node22": "^22.0.0",
"@tsconfig/node22": "^22.0.1",
"@tsconfig/recommended": "^1.0.8",
"@types/cheerio": "^0.22.35",
"@types/debug": "^4.1.12",
"@types/dom-view-transitions": "^1.0.5",
"@types/eslint__js": "^8.42.3",
"@types/express": "^4.17.21",
"@types/dom-view-transitions": "^1.0.6",
"@types/express": "^5.0.2",
"@types/jest": "^29.5.14",
"@types/markdown-it": "^14.1.2",
"@types/node": "~18.19.76",
"@types/node": "~18.19.100",
"@types/pug": "^2.0.10",
"@types/supertest": "^6.0.2",
"@types/supertest": "^6.0.3",
"@types/which": "^3.0.4",
"@types/ws": "^8.5.14",
"@types/ws": "^8.18.1",
"@types/yargs": "^17.0.33",
"@yao-pkg/pkg": "^6.3.0",
"autoprefixer": "^10.4.20",
"@yao-pkg/pkg": "^6.5.0",
"autoprefixer": "^10.4.21",
"bespoke": "bespokejs/bespoke",
"chalk": "^5.4.1",
"cheerio": "^1.0.0",
"chrome-launcher": "^1.1.2",
"chrome-launcher": "^1.2.0",
"css.escape": "^1.5.1",
"cssnano": "^7.0.6",
"debug": "^4.4.0",
"eslint": "^9.20.1",
"eslint-config-prettier": "^10.0.1",
"eslint-import-resolver-typescript": "^3.8.0",
"eslint-plugin-import-x": "^4.6.1",
"cssnano": "^7.0.7",
"debug": "^4.4.1",
"eslint": "^9.27.0",
"eslint-config-prettier": "^10.1.5",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint-plugin-import-x": "^4.11.1",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-unicorn": "^56.0.1",
"express": "^4.21.2",
"eslint-plugin-unicorn": "^59.0.1",
"express": "^5.1.0",
"fast-plist": "^0.1.3",
"globals": "^15.15.0",
"globals": "^16.1.0",
"globby": "~14.0.2",
"image-size": "^1.2.0",
"image-size": "^2.0.2",
"import-from": "^4.0.0",
"import-meta-resolve": "^4.1.0",
"is-inside-container": "^1.0.0",
"is-wsl": "^3.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-junit": "^16.0.0",
"nanoid": "^5.1.0",
"npm-check-updates": "^17.1.14",
"npm-run-all2": "^7.0.2",
"nanoid": "^5.1.5",
"npm-check-updates": "^18.0.1",
"npm-run-all2": "^8.0.2",
"os-locale": "^6.0.2",
"package-up": "^5.0.0",
"patch-package": "^8.0.0",
"pdf-lib": "^1.17.1",
"portfinder": "^1.0.32",
"postcss": "^8.5.2",
"portfinder": "^1.0.37",
"postcss": "^8.5.3",
"postcss-url": "^10.1.3",
"pptxgenjs": "^3.12.0",
"prettier": "^3.5.1",
"pptxgenjs": "^4.0.0",
"prettier": "^3.5.3",
"pug": "^3.0.3",
"rollup": "^4.34.7",
"rollup-plugin-license": "^3.5.3",
"rollup": "^4.40.2",
"rollup-plugin-license": "^3.6.0",
"rollup-plugin-postcss": "^4.0.2",
"sass": "^1.85.0",
"sass": "^1.89.0",
"strip-ansi": "^7.1.0",
"stylelint": "^16.14.1",
"stylelint-config-standard-scss": "^14.0.0",
"supertest": "^7.0.0",
"stylelint": "^16.19.1",
"stylelint-config-standard-scss": "^15.0.0",
"supertest": "^7.1.1",
"tar-stream": "^3.1.7",
"ts-jest": "^29.2.5",
"ts-jest": "^29.3.4",
"ts-key-enum": "^3.0.13",
"tslib": "^2.8.1",
"typed-emitter": "^2.1.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.32.1",
"vhtml": "^2.2.0",
"which": "^4.0.0",
"wrap-ansi": "^9.0.0",
"yauzl": "^3.2.0",
"zip-stream": "^7.0.2"
},
"dependencies": {
"@marp-team/marp-core": "^4.0.1",
"@marp-team/marpit": "^3.1.2",
"@marp-team/marp-core": "^4.1.0",
"@marp-team/marpit": "^3.1.3",
"chokidar": "^4.0.3",
"cosmiconfig": "^9.0.0",
"puppeteer-core": "24.2.1",
"puppeteer-core": "24.8.2",
"serve-index": "^1.9.1",
"tmp": "^0.2.3",
"ws": "^8.18.0",
"ws": "^8.18.2",
"yargs": "^17.7.2"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions src/engine/transition/keyframes/drop.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:root {
--bespoke-marp-transition-drop-shadow:
0 0.3vh 0.6vh rgba(0, 0, 0, 39%), rgba(0, 0, 0, 30%) 0 3vh 5vh,
rgba(0, 0, 0, 22%) 0 2vh 1.5vh;
0 0.3vh 0.6vh rgb(0 0 0 / 39%), rgb(0 0 0 / 30%) 0 3vh 5vh,
rgb(0 0 0 / 22%) 0 2vh 1.5vh;
}

// [Safari CSS hack]
Expand Down
2 changes: 1 addition & 1 deletion src/engine/transition/keyframes/swipe.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:root {
--bespoke-marp-transition-swipe-shadow: 6px 6px 10px 6px rgba(0, 0, 0, 25%);
--bespoke-marp-transition-swipe-shadow: 6px 6px 10px 6px rgb(0 0 0 / 25%);
}

// [Safari CSS hack]
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class Server extends (EventEmitter as new () => TypedEmitter<Server.Event

this.server = express.default()
this.server
.get('*', (req, res, next) =>
.get('*all', (req, res, next) =>
this.preprocess(req, res).then(() => {
if (!res.writableEnded) next()
})
Expand Down
55 changes: 32 additions & 23 deletions test/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { URL } from 'node:url'
import { promisify } from 'node:util'
import { Marp } from '@marp-team/marp-core'
import { Options } from '@marp-team/marpit'
import type { Cheerio } from 'cheerio'
import { load } from 'cheerio'
import { imageSize } from 'image-size'
import { PDFDocument, PDFDict, PDFName, PDFHexString, PDFNumber } from 'pdf-lib'
Expand Down Expand Up @@ -36,6 +37,11 @@ afterEach(() => {
jest.restoreAllMocks()
})

type JSON = string | number | boolean | null | JSON[] | { [key: string]: JSON }

const data = <T extends JSON>(elm: Cheerio<any>, name: string) =>
elm.data(name) as Record<string, T> | undefined

describe('Converter', () => {
const onePath = path.resolve(__dirname, '_files/1.md')
const twoPath = path.resolve(__dirname, '_files/2.mdown')
Expand Down Expand Up @@ -381,15 +387,16 @@ describe('Converter', () => {
$enabled('[data-transition-back]').length
).toBeGreaterThanOrEqual(1)

const enabledData = $enabled('[data-transition]').data('transition')
const enabledDataBack = $enabled('[data-transition-back]').data(
const enabledData = data($enabled('[data-transition]'), 'transition')
const enabledDataBack = data(
$enabled('[data-transition-back]'),
'transitionBack'
)

expect(enabledData.name).toBe('cover')
expect(enabledData.builtinFallback).toBe(true)
expect(enabledDataBack.name).toBe('cover')
expect(enabledDataBack.builtinFallback).toBe(true)
expect(enabledData?.name).toBe('cover')
expect(enabledData?.builtinFallback).toBe(true)
expect(enabledDataBack?.name).toBe('cover')
expect(enabledDataBack?.builtinFallback).toBe(true)

// Non built-in transition will remain for custom transition
const { result: unknownResult } = await instance({
Expand All @@ -400,9 +407,9 @@ describe('Converter', () => {
const $unknown = load(unknownResult)
expect($unknown('[data-transition]')).toHaveLength(1)

const unknownData = $unknown('[data-transition]').data('transition')
expect(unknownData.name).toBe('unknown')
expect(unknownData.builtinFallback).toBeFalsy()
const unknownData = data($unknown('[data-transition]'), 'transition')
expect(unknownData?.name).toBe('unknown')
expect(unknownData?.builtinFallback).toBeFalsy()

// Turn on and off
const { result: toggleResult } = await instance({
Expand All @@ -417,14 +424,16 @@ describe('Converter', () => {

expect(sections).toHaveLength(3)

expect($toggle(sections[0]).data('transition').name).toBe('reveal')
expect($toggle(sections[1]).data('transition').name).toBe('none')
expect($toggle(sections[2]).data('transition').name).toBe('none')
expect(data($toggle(sections[0]), 'transition')?.name).toBe('reveal')
expect(data($toggle(sections[1]), 'transition')?.name).toBe('none')
expect(data($toggle(sections[2]), 'transition')?.name).toBe('none')

// Assigning slides are shifted in backward transition
expect($toggle(sections[0]).data('transitionBack')).toBeUndefined()
expect($toggle(sections[1]).data('transitionBack').name).toBe('reveal')
expect($toggle(sections[2]).data('transitionBack').name).toBe('none')
expect(data($toggle(sections[0]), 'transitionBack')).toBeUndefined()
expect(data($toggle(sections[1]), 'transitionBack')?.name).toBe(
'reveal'
)
expect(data($toggle(sections[2]), 'transitionBack')?.name).toBe('none')
})
})

Expand All @@ -440,10 +449,10 @@ describe('Converter', () => {
)

const $result = load(result)
const data = $result('section').first().data('transition')
const transitionData = data($result('section').first(), 'transition')

expect(data.name).toBe('reveal')
expect(data.duration).toBe('1s')
expect(transitionData?.name).toBe('reveal')
expect(transitionData?.duration).toBe('1s')
})
})

Expand All @@ -465,12 +474,12 @@ describe('Converter', () => {
)
const $result = load(result)

const data = $result('section').first().data('transition')
expect(data.name).toMatch(/^hello-\w+$/)
const transitionData = data($result('section').first(), 'transition')
const bData = data($result($result('section').get(1)), 'transitionBack')

const bData = $result($result('section').get(1)).data('transitionBack')
expect(bData.name).toMatch(/^hello-\w+$/)
expect(bData.name).toBe(data.name)
expect(transitionData?.name).toMatch(/^hello-\w+$/)
expect(bData?.name).toMatch(/^hello-\w+$/)
expect(bData?.name).toBe(transitionData?.name)
})
})
})
Expand Down