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 #102

Merged
merged 4 commits into from
Nov 17, 2019
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 @@ -6,6 +6,10 @@

- Add documentation about how to enable HTML into README ([#98](https://github.com/marp-team/marp-vscode/issues/98), [#99](https://github.com/marp-team/marp-vscode/pull/99) by [@eric-burel](https://github.com/eric-burel))

### Changed

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

## v0.11.0 - 2019-11-07

### Breaking
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@
"watch": "rollup -w -c ./rollup.config.js"
},
"devDependencies": {
"@types/cheerio": "^0.22.13",
"@types/jest": "^24.0.22",
"@rollup/plugin-json": "^4.0.0",
"@types/cheerio": "^0.22.14",
"@types/jest": "^24.0.23",
"@types/lodash.debounce": "^4.0.6",
"@types/markdown-it": "^0.0.9",
"@types/vscode": "~1.36.0",
Expand All @@ -220,29 +221,28 @@
"jest-junit": "^9.0.0",
"lodash.debounce": "^4.0.8",
"markdown-it": "^10.0.0",
"nanoid": "^2.1.6",
"nanoid": "^2.1.7",
"npm-run-all": "^4.1.5",
"prettier": "^1.18.2",
"rehype-parse": "^6.0.1",
"remark": "^11.0.1",
"remark-parse": "^7.0.1",
"prettier": "^1.19.1",
"rehype-parse": "^6.0.2",
"remark": "^11.0.2",
"remark-parse": "^7.0.2",
"rimraf": "^3.0.0",
"rollup": "^1.26.3",
"rollup": "^1.27.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.1.2",
"rollup-plugin-typescript": "^1.0.1",
"stylelint": "^11.1.1",
"stylelint": "^12.0.0",
"stylelint-config-prettier": "^6.0.0",
"stylelint-config-standard": "^19.0.0",
"ts-jest": "^24.1.0",
"tslint": "^5.20.1",
"tslint-config-airbnb": "^5.11.2",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.7.2",
"unified": "^8.4.1",
"unist-util-visit": "^2.0.0",
"unified": "^8.4.2",
"unist-util-visit": "^2.0.1",
"yaml": "^1.7.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path'
import json from '@rollup/plugin-json'
import commonjs from 'rollup-plugin-commonjs'
import json from 'rollup-plugin-json'
import nodeResolve from 'rollup-plugin-node-resolve'
import { terser } from 'rollup-plugin-terser'
import typescript from 'rollup-plugin-typescript'
Expand Down
4 changes: 1 addition & 3 deletions src/commands/show-quick-pick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ export default async function showQuickPick() {
placeHolder: 'Select available command in Marp for VS Code...',
})

if (command && command.description) {
await commands.executeCommand(command.description)
}
if (command?.description) await commands.executeCommand(command.description)
}
4 changes: 2 additions & 2 deletions src/diagnostics/deprecated-dollar-prefix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function register(doc: TextDocument, diagnostics: Diagnostic[]) {
const detectDirectives = (text: string, offset: number = 0) => {
const { contents, errors } = parseYaml(text)

if (errors.length === 0 && contents && contents['items']) {
if (errors.length === 0 && contents?.['items']) {
for (const item of contents['items']) {
if (item.type === 'PAIR' && warnDirectives.includes(item.key.value)) {
const name = item.key.value.slice(1)
Expand All @@ -60,7 +60,7 @@ export function register(doc: TextDocument, diagnostics: Diagnostic[]) {
// Front-matter
const fmMatched = markdown.match(frontMatterRegex)

if (fmMatched && fmMatched.index === 0) {
if (fmMatched?.index === 0) {
const [, open, body, close] = fmMatched
detectDirectives(body, open.length)

Expand Down
2 changes: 1 addition & 1 deletion src/marp-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function createWorkFile(doc: TextDocument): Promise<WorkFile> {
// If it fails, try to create to the root of workspace
const documentWorkspace = workspace.getWorkspaceFolder(doc.uri)

if (documentWorkspace && documentWorkspace.uri.scheme === 'file') {
if (documentWorkspace?.uri.scheme === 'file') {
const workspaceDir = documentWorkspace.uri.fsPath
const workspaceDirTmpPath = path.join(workspaceDir, tmpFileName)

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/line-number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function marpVSCodeLineNumber(md) {
.slice(idx + 1)
.find(t => t.type === 'marpit_slide_open')

if (slide.map && slide.map.length) {
if (slide.map?.length) {
tokens[idx].attrJoin('class', 'code-line')
tokens[idx].attrSet('data-line', slide.map[0])
}
Expand All @@ -36,7 +36,7 @@ export default function marpVSCodeLineNumber(md) {
md.renderer.rules[rule] = (tokens, idx, options, env, self) => {
const token = tokens[idx]

if (token.map && token.map.length) {
if (token.map?.length) {
token.attrJoin('class', 'code-line')
token.attrSet('data-line', token.map[0])
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const marpDirectiveRegex = /^(marp\s*: +)(.*)\s*$/m

export const detectFrontMatter = (markdown: string): string | undefined => {
const m = markdown.match(frontMatterRegex)
return m && m.index === 0 ? m[2] : undefined
return m?.index === 0 ? m[2] : undefined
}

export const detectMarpDocument = (doc: TextDocument): boolean =>
Expand Down
Loading