Skip to content

Commit

Permalink
Merge pull request #127 from 0x6b/update-dependencies
Browse files Browse the repository at this point in the history
deps: update dependencies
  • Loading branch information
0x6b committed Mar 16, 2024
2 parents 027ec1d + 5788105 commit 09722e0
Show file tree
Hide file tree
Showing 12 changed files with 9,964 additions and 10,920 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## Planned (but not scheduled yet)

- Manifest V3 migration

## 0.22.0 - 2024-03-17

### Changed

- Update dependencies (#127)

Due to major version bump of (6.0.0 to 7.1.3) the [Turndown](https://github.com/mixmark-io/turndown/) which this extension heavily relies on, the behavior might've been changed. It might be impossible for me to reserve backward compatibility, but I will try to fix the issue as much as possible, if any.

## 0.21.0 - 2021-06-27

### Added
Expand Down
Binary file not shown.
Binary file not shown.
20,291 changes: 9,652 additions & 10,639 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"clean": "npm run clean --workspaces"
},
"devDependencies": {
"@types/firefox-webext-browser": "^82.0.0",
"copy-webpack-plugin": "^9.0.1",
"@types/firefox-webext-browser": "^120.0.3",
"copy-webpack-plugin": "^12.0.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"web-ext": "^6.2.0",
"webpack": "^5.40.0",
"webpack-cli": "^4.7.2"
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"web-ext": "^7.11.0",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4"
},
"version": "0.21.0",
"version": "0.22.0",
"engines": {
"node": "16.x"
"node": "20.x"
}
}
2 changes: 1 addition & 1 deletion packages/chromium/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Copy Selection as Markdown",
"version": "0.21.0",
"version": "0.22.0",
"description": "Copy title, URL, and selection as Markdown",
"icons": {
"16": "icons/icon16.png",
Expand Down
2 changes: 1 addition & 1 deletion packages/chromium/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "copy-selection-as-markdown-chromium",
"version": "0.21.0",
"version": "0.22.0",
"description": "copy-selection-as-markdown Chrome extension",
"author": "0x6b",
"license": "MIT",
Expand Down
32 changes: 16 additions & 16 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "copy-selection-as-markdown-core",
"version": "0.21.0",
"version": "0.22.0",
"description": "copy-selection-as-markdown core",
"author": "0x6b",
"license": "MIT",
Expand All @@ -16,23 +16,23 @@
"test": "jest"
},
"dependencies": {
"clipboard-polyfill": "^2.8.6",
"regex-escape": "^3.4.9",
"turndown": "^6.0.0",
"clipboard-polyfill": "^4.0.2",
"regex-escape": "^3.4.10",
"turndown": "^7.1.3",
"turndown-plugin-gfm": "^1.0.2",
"url": "^0.11.0"
"url": "^0.11.3"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.1",
"@babel/plugin-transform-runtime": "^7.10.1",
"@babel/preset-env": "^7.10.1",
"@babel/runtime": "^7.10.1",
"@babel/runtime-corejs3": "^7.10.1",
"babel-loader": "^8.1.0",
"core-js": "2",
"jest": "^26.0.1",
"jsdom": "^16.2.2"
"@babel/cli": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/runtime": "^7.24.0",
"@babel/runtime-corejs3": "^7.24.0",
"babel-loader": "^9.1.3",
"core-js": "3",
"jest": "^29.7.0",
"jsdom": "^24.0.0"
},
"babel": {
"presets": [
Expand All @@ -43,7 +43,7 @@
"firefox": "57"
},
"useBuiltIns": "usage",
"corejs": 2
"corejs": 3
}
]
]
Expand Down
17 changes: 12 additions & 5 deletions packages/core/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,18 @@ const getSelectionAsMarkdown = async (options) => {
return { html, output: turndownService.turndown(html), url: document.URL };
};

const doCopy = (text, html) => {
const dt = new clipboard.DT();
dt.setData("text/plain", text);
dt.setData("text/html", html);
clipboard.write(dt);
const doCopy = async (text, html) => {
const item = new clipboard.ClipboardItem({
"text/html": new Blob(
[html],
{ type: "text/html" }
),
"text/plain": new Blob(
[text],
{ type: "text/plain" }
),
});
await clipboard.write([item]);
};

const imgToDataUrl = (image) => {
Expand Down
Loading

0 comments on commit 09722e0

Please sign in to comment.