Skip to content

Commit a251a14

Browse files
authored
Merge pull request #657 from marp-team/upgrade-dependncies
Upgrade dependent packages to the latest version
2 parents a3455cf + 53e8ad7 commit a251a14

File tree

8 files changed

+2295
-2621
lines changed

8 files changed

+2295
-2621
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- 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))
8+
- 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))
9+
- Transform Unicode 16 emojis into Twemoji images by default
10+
- Upgrade dependent packages to the latest version ([#657](https://github.com/marp-team/marp-cli/pull/657))
11+
512
## v4.1.2 - 2025-02-21
613

714
### Added

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const esModules = [
2323
'path-exists',
2424
'path-type',
2525
'package-up',
26+
'pptxgenjs',
2627
'slash',
2728
'strip-ansi',
2829
'unicorn-magic',
@@ -39,6 +40,7 @@ module.exports = {
3940
setupFiles: ['./jest.setup.js'],
4041
transform: {
4142
...jsWithBabel.transform,
43+
'_configs[/\\\\].+\\.mjs$': 'babel-jest',
4244
'\\.s?css$': '<rootDir>/test/_transformers/css.js',
4345
'\\.png$': '<rootDir>/test/_transformers/png.js',
4446
'\\.pug$': '<rootDir>/test/_transformers/pug.js',

package-lock.json

Lines changed: 2207 additions & 2549 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -67,101 +67,99 @@
6767
"watch": "rollup -w -c"
6868
},
6969
"devDependencies": {
70-
"@babel/preset-env": "^7.26.9",
71-
"@formatjs/intl-segmenter": "^11.7.9",
70+
"@babel/preset-env": "^7.27.2",
71+
"@formatjs/intl-segmenter": "^11.7.10",
7272
"@rollup/plugin-alias": "^5.1.1",
73-
"@rollup/plugin-commonjs": "^28.0.2",
73+
"@rollup/plugin-commonjs": "^28.0.3",
7474
"@rollup/plugin-json": "^6.1.0",
75-
"@rollup/plugin-node-resolve": "^16.0.0",
75+
"@rollup/plugin-node-resolve": "^16.0.1",
7676
"@rollup/plugin-replace": "^6.0.2",
7777
"@rollup/plugin-terser": "^0.4.4",
7878
"@rollup/plugin-typescript": "^12.1.2",
7979
"@rollup/plugin-url": "^8.0.2",
80-
"@tsconfig/node22": "^22.0.0",
80+
"@tsconfig/node22": "^22.0.1",
8181
"@tsconfig/recommended": "^1.0.8",
82-
"@types/cheerio": "^0.22.35",
8382
"@types/debug": "^4.1.12",
84-
"@types/dom-view-transitions": "^1.0.5",
85-
"@types/eslint__js": "^8.42.3",
86-
"@types/express": "^4.17.21",
83+
"@types/dom-view-transitions": "^1.0.6",
84+
"@types/express": "^5.0.2",
8785
"@types/jest": "^29.5.14",
8886
"@types/markdown-it": "^14.1.2",
89-
"@types/node": "~18.19.76",
87+
"@types/node": "~18.19.100",
9088
"@types/pug": "^2.0.10",
91-
"@types/supertest": "^6.0.2",
89+
"@types/supertest": "^6.0.3",
9290
"@types/which": "^3.0.4",
93-
"@types/ws": "^8.5.14",
91+
"@types/ws": "^8.18.1",
9492
"@types/yargs": "^17.0.33",
95-
"@yao-pkg/pkg": "^6.3.0",
96-
"autoprefixer": "^10.4.20",
93+
"@yao-pkg/pkg": "^6.5.0",
94+
"autoprefixer": "^10.4.21",
9795
"bespoke": "bespokejs/bespoke",
9896
"chalk": "^5.4.1",
9997
"cheerio": "^1.0.0",
100-
"chrome-launcher": "^1.1.2",
98+
"chrome-launcher": "^1.2.0",
10199
"css.escape": "^1.5.1",
102-
"cssnano": "^7.0.6",
103-
"debug": "^4.4.0",
104-
"eslint": "^9.20.1",
105-
"eslint-config-prettier": "^10.0.1",
106-
"eslint-import-resolver-typescript": "^3.8.0",
107-
"eslint-plugin-import-x": "^4.6.1",
100+
"cssnano": "^7.0.7",
101+
"debug": "^4.4.1",
102+
"eslint": "^9.27.0",
103+
"eslint-config-prettier": "^10.1.5",
104+
"eslint-import-resolver-typescript": "^4.3.4",
105+
"eslint-plugin-import-x": "^4.11.1",
108106
"eslint-plugin-jest": "^28.11.0",
109-
"eslint-plugin-unicorn": "^56.0.1",
110-
"express": "^4.21.2",
107+
"eslint-plugin-unicorn": "^59.0.1",
108+
"express": "^5.1.0",
111109
"fast-plist": "^0.1.3",
112-
"globals": "^15.15.0",
110+
"globals": "^16.1.0",
113111
"globby": "~14.0.2",
114-
"image-size": "^1.2.0",
112+
"image-size": "^2.0.2",
115113
"import-from": "^4.0.0",
116114
"import-meta-resolve": "^4.1.0",
117115
"is-inside-container": "^1.0.0",
118116
"is-wsl": "^3.1.0",
119117
"jest": "^29.7.0",
120118
"jest-environment-jsdom": "^29.7.0",
121119
"jest-junit": "^16.0.0",
122-
"nanoid": "^5.1.0",
123-
"npm-check-updates": "^17.1.14",
124-
"npm-run-all2": "^7.0.2",
120+
"nanoid": "^5.1.5",
121+
"npm-check-updates": "^18.0.1",
122+
"npm-run-all2": "^8.0.2",
125123
"os-locale": "^6.0.2",
126124
"package-up": "^5.0.0",
127125
"patch-package": "^8.0.0",
128126
"pdf-lib": "^1.17.1",
129-
"portfinder": "^1.0.32",
130-
"postcss": "^8.5.2",
127+
"portfinder": "^1.0.37",
128+
"postcss": "^8.5.3",
131129
"postcss-url": "^10.1.3",
132-
"pptxgenjs": "^3.12.0",
133-
"prettier": "^3.5.1",
130+
"pptxgenjs": "^4.0.0",
131+
"prettier": "^3.5.3",
134132
"pug": "^3.0.3",
135-
"rollup": "^4.34.7",
136-
"rollup-plugin-license": "^3.5.3",
133+
"rollup": "^4.40.2",
134+
"rollup-plugin-license": "^3.6.0",
137135
"rollup-plugin-postcss": "^4.0.2",
138-
"sass": "^1.85.0",
136+
"sass": "^1.89.0",
139137
"strip-ansi": "^7.1.0",
140-
"stylelint": "^16.14.1",
141-
"stylelint-config-standard-scss": "^14.0.0",
142-
"supertest": "^7.0.0",
138+
"stylelint": "^16.19.1",
139+
"stylelint-config-standard-scss": "^15.0.0",
140+
"supertest": "^7.1.1",
143141
"tar-stream": "^3.1.7",
144-
"ts-jest": "^29.2.5",
142+
"ts-jest": "^29.3.4",
145143
"ts-key-enum": "^3.0.13",
146144
"tslib": "^2.8.1",
147145
"typed-emitter": "^2.1.0",
148-
"typescript": "^5.7.3",
149-
"typescript-eslint": "^8.24.0",
146+
"typescript": "^5.8.3",
147+
"typescript-eslint": "^8.32.1",
150148
"vhtml": "^2.2.0",
151149
"which": "^4.0.0",
152150
"wrap-ansi": "^9.0.0",
153151
"yauzl": "^3.2.0",
154152
"zip-stream": "^7.0.2"
155153
},
156154
"dependencies": {
157-
"@marp-team/marp-core": "^4.0.1",
158-
"@marp-team/marpit": "^3.1.2",
155+
"@marp-team/marp-core": "^4.1.0",
156+
"@marp-team/marpit": "^3.1.3",
159157
"chokidar": "^4.0.3",
160158
"cosmiconfig": "^9.0.0",
161-
"puppeteer-core": "24.2.1",
159+
"puppeteer-core": "24.8.2",
162160
"serve-index": "^1.9.1",
163161
"tmp": "^0.2.3",
164-
"ws": "^8.18.0",
162+
"ws": "^8.18.2",
165163
"yargs": "^17.7.2"
166164
},
167165
"publishConfig": {

src/engine/transition/keyframes/drop.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:root {
22
--bespoke-marp-transition-drop-shadow:
3-
0 0.3vh 0.6vh rgba(0, 0, 0, 39%), rgba(0, 0, 0, 30%) 0 3vh 5vh,
4-
rgba(0, 0, 0, 22%) 0 2vh 1.5vh;
3+
0 0.3vh 0.6vh rgb(0 0 0 / 39%), rgb(0 0 0 / 30%) 0 3vh 5vh,
4+
rgb(0 0 0 / 22%) 0 2vh 1.5vh;
55
}
66

77
// [Safari CSS hack]

src/engine/transition/keyframes/swipe.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:root {
2-
--bespoke-marp-transition-swipe-shadow: 6px 6px 10px 6px rgba(0, 0, 0, 25%);
2+
--bespoke-marp-transition-swipe-shadow: 6px 6px 10px 6px rgb(0 0 0 / 25%);
33
}
44

55
// [Safari CSS hack]

src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class Server extends (EventEmitter as new () => TypedEmitter<Server.Event
179179

180180
this.server = express.default()
181181
this.server
182-
.get('*', (req, res, next) =>
182+
.get('*all', (req, res, next) =>
183183
this.preprocess(req, res).then(() => {
184184
if (!res.writableEnded) next()
185185
})

test/converter.ts

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { URL } from 'node:url'
55
import { promisify } from 'node:util'
66
import { Marp } from '@marp-team/marp-core'
77
import { Options } from '@marp-team/marpit'
8+
import type { Cheerio } from 'cheerio'
89
import { load } from 'cheerio'
910
import { imageSize } from 'image-size'
1011
import { PDFDocument, PDFDict, PDFName, PDFHexString, PDFNumber } from 'pdf-lib'
@@ -36,6 +37,11 @@ afterEach(() => {
3637
jest.restoreAllMocks()
3738
})
3839

40+
type JSON = string | number | boolean | null | JSON[] | { [key: string]: JSON }
41+
42+
const data = <T extends JSON>(elm: Cheerio<any>, name: string) =>
43+
elm.data(name) as Record<string, T> | undefined
44+
3945
describe('Converter', () => {
4046
const onePath = path.resolve(__dirname, '_files/1.md')
4147
const twoPath = path.resolve(__dirname, '_files/2.mdown')
@@ -381,15 +387,16 @@ describe('Converter', () => {
381387
$enabled('[data-transition-back]').length
382388
).toBeGreaterThanOrEqual(1)
383389

384-
const enabledData = $enabled('[data-transition]').data('transition')
385-
const enabledDataBack = $enabled('[data-transition-back]').data(
390+
const enabledData = data($enabled('[data-transition]'), 'transition')
391+
const enabledDataBack = data(
392+
$enabled('[data-transition-back]'),
386393
'transitionBack'
387394
)
388395

389-
expect(enabledData.name).toBe('cover')
390-
expect(enabledData.builtinFallback).toBe(true)
391-
expect(enabledDataBack.name).toBe('cover')
392-
expect(enabledDataBack.builtinFallback).toBe(true)
396+
expect(enabledData?.name).toBe('cover')
397+
expect(enabledData?.builtinFallback).toBe(true)
398+
expect(enabledDataBack?.name).toBe('cover')
399+
expect(enabledDataBack?.builtinFallback).toBe(true)
393400

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

403-
const unknownData = $unknown('[data-transition]').data('transition')
404-
expect(unknownData.name).toBe('unknown')
405-
expect(unknownData.builtinFallback).toBeFalsy()
410+
const unknownData = data($unknown('[data-transition]'), 'transition')
411+
expect(unknownData?.name).toBe('unknown')
412+
expect(unknownData?.builtinFallback).toBeFalsy()
406413

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

418425
expect(sections).toHaveLength(3)
419426

420-
expect($toggle(sections[0]).data('transition').name).toBe('reveal')
421-
expect($toggle(sections[1]).data('transition').name).toBe('none')
422-
expect($toggle(sections[2]).data('transition').name).toBe('none')
427+
expect(data($toggle(sections[0]), 'transition')?.name).toBe('reveal')
428+
expect(data($toggle(sections[1]), 'transition')?.name).toBe('none')
429+
expect(data($toggle(sections[2]), 'transition')?.name).toBe('none')
423430

424431
// Assigning slides are shifted in backward transition
425-
expect($toggle(sections[0]).data('transitionBack')).toBeUndefined()
426-
expect($toggle(sections[1]).data('transitionBack').name).toBe('reveal')
427-
expect($toggle(sections[2]).data('transitionBack').name).toBe('none')
432+
expect(data($toggle(sections[0]), 'transitionBack')).toBeUndefined()
433+
expect(data($toggle(sections[1]), 'transitionBack')?.name).toBe(
434+
'reveal'
435+
)
436+
expect(data($toggle(sections[2]), 'transitionBack')?.name).toBe('none')
428437
})
429438
})
430439

@@ -440,10 +449,10 @@ describe('Converter', () => {
440449
)
441450

442451
const $result = load(result)
443-
const data = $result('section').first().data('transition')
452+
const transitionData = data($result('section').first(), 'transition')
444453

445-
expect(data.name).toBe('reveal')
446-
expect(data.duration).toBe('1s')
454+
expect(transitionData?.name).toBe('reveal')
455+
expect(transitionData?.duration).toBe('1s')
447456
})
448457
})
449458

@@ -465,12 +474,12 @@ describe('Converter', () => {
465474
)
466475
const $result = load(result)
467476

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

471-
const bData = $result($result('section').get(1)).data('transitionBack')
472-
expect(bData.name).toMatch(/^hello-\w+$/)
473-
expect(bData.name).toBe(data.name)
480+
expect(transitionData?.name).toMatch(/^hello-\w+$/)
481+
expect(bData?.name).toMatch(/^hello-\w+$/)
482+
expect(bData?.name).toBe(transitionData?.name)
474483
})
475484
})
476485
})

0 commit comments

Comments
 (0)