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 dependent packages to the latest version #212

Merged
merged 3 commits into from
Mar 15, 2020
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Upgrade dependent packages to the latest version ([#212](https://github.com/marp-team/marp-cli/pull/212))

## v0.17.2 - 2020-02-25

### Fixed
Expand Down
47 changes: 23 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,18 @@
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@rollup/plugin-typescript": "^3.0.0",
"@rollup/plugin-typescript": "^4.0.0",
"@rollup/plugin-url": "^4.0.2",
"@types/cheerio": "^0.22.16",
"@types/cosmiconfig": "^6.0.0",
"@types/express": "^4.17.2",
"@types/jest": "^25.1.3",
"@types/express": "^4.17.3",
"@types/jest": "^25.1.4",
"@types/jest-plugin-context": "^2.9.2",
"@types/node": "~12.12.28",
"@types/node": "~12.12.30",
"@types/pug": "^2.0.4",
"@types/puppeteer": "^2.0.0",
"@types/puppeteer": "^2.0.1",
"@types/supertest": "^2.0.8",
"@types/ws": "^7.2.1",
"@types/yargs": "^15.0.3",
"@types/ws": "^7.2.2",
"@types/yargs": "^15.0.4",
"autoprefixer": "^9.7.4",
"bespoke": "bespokejs/bespoke",
"builtin-modules": "^3.1.0",
Expand All @@ -92,41 +91,41 @@
"jest-plugin-context": "^2.9.0",
"nanoid": "^2.1.11",
"npm-run-all": "^4.1.5",
"pkg": "^4.4.3",
"pkg": "^4.4.4",
"postcss-url": "^8.0.0",
"prettier": "^1.19.1",
"pug": "^2.0.4",
"rimraf": "^3.0.2",
"rollup": "^1.31.1",
"rollup-plugin-postcss": "^2.0.6",
"rollup": "^2.0.6",
"rollup-plugin-postcss": "^2.4.1",
"rollup-plugin-pug": "^1.1.1",
"rollup-plugin-terser": "^5.2.0",
"sass": "^1.25.0",
"rollup-plugin-terser": "^5.3.0",
"sass": "^1.26.3",
"screenfull": "^5.0.2",
"stylelint": "^13.2.0",
"stylelint": "^13.2.1",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.14.2",
"stylelint-scss": "^3.15.0",
"supertest": "^4.0.2",
"tar-stream": "^2.1.0",
"tar-stream": "^2.1.2",
"ts-jest": "^25.2.1",
"ts-keycode-enum": "^1.0.6",
"tslib": "^1.11.0",
"tslint": "^6.0.0",
"tslib": "^1.11.1",
"tslint": "^6.1.0",
"tslint-config-airbnb": "^5.11.2",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.8.2",
"typescript": "^3.8.3",
"vhtml": "^2.2.0",
"yauzl": "^2.10.0",
"zip-stream": "^2.1.3"
},
"dependencies": {
"@marp-team/marp-core": "^1.0.1",
"@marp-team/marpit": "^1.5.0",
"@marp-team/marp-core": "^1.1.0",
"@marp-team/marpit": "^1.5.1",
"carlo": "^0.9.46",
"chalk": "^3.0.0",
"chokidar": "^3.3.1",
"chrome-launcher": "^0.12.0",
"chrome-launcher": "^0.13.0",
"cosmiconfig": "^6.0.0",
"express": "^4.17.1",
"file-url": "^3.0.0",
Expand All @@ -145,8 +144,8 @@
"tmp": "^0.1.0",
"v8-compile-cache": "^2.1.0",
"wrap-ansi": "^6.2.0",
"ws": "^7.2.1",
"yargs": "^15.1.0"
"ws": "^7.2.3",
"yargs": "^15.3.0"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 2 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ import pugPlugin from 'rollup-plugin-pug'
import { terser } from 'rollup-plugin-terser'
import { dependencies } from './package.json'

const external = [
...Object.keys(dependencies),
'chrome-launcher/dist/chrome-finder',
'yargs/yargs',
]
const external = [...Object.keys(dependencies), 'yargs/yargs']

const plugins = (opts = {}) => [
json({ preferConst: true }),
Expand All @@ -28,7 +24,7 @@ const plugins = (opts = {}) => [
}),
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
commonjs(),
typescript({ module: 'esnext' }),
typescript(),
postcss({
inject: false,
plugins: [
Expand Down
17 changes: 6 additions & 11 deletions src/utils/puppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { exec } from 'child_process'
import { promisify } from 'util'
import os from 'os'
import path from 'path'
import * as chromeFinder from 'chrome-launcher/dist/chrome-finder'
import { Launcher } from 'chrome-launcher'

const execPromise = promisify(exec)

Expand Down Expand Up @@ -48,17 +48,12 @@ export async function generatePuppeteerLaunchArgs() {

// Resolve Chrome path to execute
if (executablePath === false) {
const finder: (() => string[]) | undefined = (() => {
if (process.env.IS_DOCKER) {
// Use already known path within Marp CLI official Docker image
if (process.env.IS_DOCKER) return () => ['/usr/bin/chromium-browser']

// Use Chrome installed to Windows within WSL
if (isWSL()) return chromeFinder.wsl

return chromeFinder[process.platform]
})()

executablePath = finder ? finder()[0] : undefined
executablePath = '/usr/bin/chromium-browser'
} else {
;[executablePath] = Launcher.getInstallations()
}
}

return { executablePath, args: [...args] }
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"esModuleInterop": true,
"jsx": "react",
"lib": ["es2016", "es2017", "dom"],
"module": "commonjs",
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": false,
"outDir": "lib",
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"target": "es2015"
},
"include": ["src"]
"include": ["src"],
"exclude": ["**/__mocks__"]
}
Loading