Skip to content

Commit

Permalink
Merge pull request #51 from marp-team/update-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependent packages to the latest version
  • Loading branch information
yhatt authored Jun 17, 2019
2 parents e58bc61 + 8b65a37 commit ed41c44
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 192 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
- Fix wrong hit area for link caused by Marpit polyfill when using VS Code >= 1.36 ([#45](https://github.com/marp-team/marp-vscode/issues/45), [#49](https://github.com/marp-team/marp-vscode/pull/49))
- Better scroll-sync when using VS Code >= 1.36 ([#50](https://github.com/marp-team/marp-vscode/pull/50))

### Changed

- Upgrade Marp Core to [v0.10.1](https://github.com/marp-team/marp-core/releases/v0.10.1) ([#51](https://github.com/marp-team/marp-vscode/pull/51))
- Upgrade dependent packages to the latest version ([#51](https://github.com/marp-team/marp-vscode/pull/51))

## v0.5.1 - 2019-06-12

### Added
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@
"watch": "rollup -w -c ./rollup.config.js"
},
"devDependencies": {
"@marp-team/marpit-svg-polyfill": "^0.3.0",
"@marp-team/marpit-svg-polyfill": "^1.0.0",
"@types/cheerio": "^0.22.11",
"@types/jest": "^24.0.13",
"@types/jest": "^24.0.15",
"@types/markdown-it": "^0.0.7",
"@types/semver": "^6.0.0",
"cheerio": "^1.0.0-rc.3",
Expand All @@ -187,27 +187,27 @@
"markdown-it": "^8.4.2",
"nanoid": "^2.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^1.17.1",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"rollup": "^1.13.1",
"rollup": "^1.15.6",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.1",
"rollup-plugin-node-resolve": "^5.0.3",
"rollup-plugin-terser": "^5.0.0",
"rollup-plugin-typescript": "^1.0.1",
"semver": "^6.1.1",
"stylelint": "^10.0.1",
"stylelint": "^10.1.0",
"stylelint-config-prettier": "^5.2.0",
"stylelint-config-standard": "^18.3.0",
"ts-jest": "^24.0.2",
"tslint": "^5.17.0",
"tslint-config-airbnb": "^5.11.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.5.1",
"typescript": "^3.5.2",
"vscode": "^1.1.34"
},
"dependencies": {
"@marp-team/marp-cli": "^0.10.0",
"@marp-team/marp-core": "^0.10.0"
"@marp-team/marp-core": "^0.10.1"
}
}
13 changes: 1 addition & 12 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,8 @@ export function extendMarkdownIt(md: any) {
const marpMarkdown = md[marpVscode].markdown

// Use image stabilizer and link normalizer from VS Code
marpMarkdown.renderer.rules.image = md.renderer.rules.image
marpMarkdown.normalizeLink = md.normalizeLink
marpMarkdown.renderer.rules.image = (tokens, idx, ...args) => {
const token = tokens[idx]
const originalSrc = token.attrGet('src')

// Marpit v1.1.0 stores src attr as String object but VS Code does not
// allow, so we have to convert attribute to string literal.
if (originalSrc && typeof originalSrc !== 'string') {
token.attrSet('src', originalSrc.toString())
}

return md.renderer.rules.image(tokens, idx, ...args)
}

// validateLink prefers Marp's default. If overridden by VS Code's it,
// does not return compatible result with the other Marp tools.
Expand Down
6 changes: 3 additions & 3 deletions src/marp-cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ describe('#createWorkFile', () => {

jest
.spyOn(workspace, 'getWorkspaceFolder')
.mockImplementationOnce(
(): any => ({ uri: { scheme: 'file', fsPath: '/workspace/' } })
)
.mockImplementationOnce((): any => ({
uri: { scheme: 'file', fsPath: '/workspace/' },
}))

const workFile = await createWorkFile({
getText: jest.fn(),
Expand Down
Loading

0 comments on commit ed41c44

Please sign in to comment.