Skip to content

Commit 09722e0

Browse files
authored
Merge pull request #127 from 0x6b/update-dependencies
deps: update dependencies
2 parents 027ec1d + 5788105 commit 09722e0

File tree

12 files changed

+9964
-10920
lines changed

12 files changed

+9964
-10920
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## Planned (but not scheduled yet)
4+
5+
- Manifest V3 migration
6+
7+
## 0.22.0 - 2024-03-17
8+
9+
### Changed
10+
11+
- Update dependencies (#127)
12+
13+
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.
14+
315
## 0.21.0 - 2021-06-27
416

517
### Added
121 KB
Binary file not shown.
319 KB
Binary file not shown.

package-lock.json

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

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
"clean": "npm run clean --workspaces"
1515
},
1616
"devDependencies": {
17-
"@types/firefox-webext-browser": "^82.0.0",
18-
"copy-webpack-plugin": "^9.0.1",
17+
"@types/firefox-webext-browser": "^120.0.3",
18+
"copy-webpack-plugin": "^12.0.2",
1919
"npm-run-all": "^4.1.5",
20-
"prettier": "^2.0.5",
21-
"rimraf": "^3.0.2",
22-
"web-ext": "^6.2.0",
23-
"webpack": "^5.40.0",
24-
"webpack-cli": "^4.7.2"
20+
"prettier": "^3.2.5",
21+
"rimraf": "^5.0.5",
22+
"web-ext": "^7.11.0",
23+
"webpack": "^5.90.3",
24+
"webpack-cli": "^5.1.4"
2525
},
26-
"version": "0.21.0",
26+
"version": "0.22.0",
2727
"engines": {
28-
"node": "16.x"
28+
"node": "20.x"
2929
}
3030
}

packages/chromium/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Copy Selection as Markdown",
4-
"version": "0.21.0",
4+
"version": "0.22.0",
55
"description": "Copy title, URL, and selection as Markdown",
66
"icons": {
77
"16": "icons/icon16.png",

packages/chromium/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "copy-selection-as-markdown-chromium",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"description": "copy-selection-as-markdown Chrome extension",
55
"author": "0x6b",
66
"license": "MIT",

packages/core/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "copy-selection-as-markdown-core",
3-
"version": "0.21.0",
3+
"version": "0.22.0",
44
"description": "copy-selection-as-markdown core",
55
"author": "0x6b",
66
"license": "MIT",
@@ -16,23 +16,23 @@
1616
"test": "jest"
1717
},
1818
"dependencies": {
19-
"clipboard-polyfill": "^2.8.6",
20-
"regex-escape": "^3.4.9",
21-
"turndown": "^6.0.0",
19+
"clipboard-polyfill": "^4.0.2",
20+
"regex-escape": "^3.4.10",
21+
"turndown": "^7.1.3",
2222
"turndown-plugin-gfm": "^1.0.2",
23-
"url": "^0.11.0"
23+
"url": "^0.11.3"
2424
},
2525
"devDependencies": {
26-
"@babel/cli": "^7.10.1",
27-
"@babel/core": "^7.10.1",
28-
"@babel/plugin-transform-runtime": "^7.10.1",
29-
"@babel/preset-env": "^7.10.1",
30-
"@babel/runtime": "^7.10.1",
31-
"@babel/runtime-corejs3": "^7.10.1",
32-
"babel-loader": "^8.1.0",
33-
"core-js": "2",
34-
"jest": "^26.0.1",
35-
"jsdom": "^16.2.2"
26+
"@babel/cli": "^7.23.9",
27+
"@babel/core": "^7.24.0",
28+
"@babel/plugin-transform-runtime": "^7.24.0",
29+
"@babel/preset-env": "^7.24.0",
30+
"@babel/runtime": "^7.24.0",
31+
"@babel/runtime-corejs3": "^7.24.0",
32+
"babel-loader": "^9.1.3",
33+
"core-js": "3",
34+
"jest": "^29.7.0",
35+
"jsdom": "^24.0.0"
3636
},
3737
"babel": {
3838
"presets": [
@@ -43,7 +43,7 @@
4343
"firefox": "57"
4444
},
4545
"useBuiltIns": "usage",
46-
"corejs": 2
46+
"corejs": 3
4747
}
4848
]
4949
]

packages/core/src/util.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,18 @@ const getSelectionAsMarkdown = async (options) => {
180180
return { html, output: turndownService.turndown(html), url: document.URL };
181181
};
182182

183-
const doCopy = (text, html) => {
184-
const dt = new clipboard.DT();
185-
dt.setData("text/plain", text);
186-
dt.setData("text/html", html);
187-
clipboard.write(dt);
183+
const doCopy = async (text, html) => {
184+
const item = new clipboard.ClipboardItem({
185+
"text/html": new Blob(
186+
[html],
187+
{ type: "text/html" }
188+
),
189+
"text/plain": new Blob(
190+
[text],
191+
{ type: "text/plain" }
192+
),
193+
});
194+
await clipboard.write([item]);
188195
};
189196

190197
const imgToDataUrl = (image) => {

0 commit comments

Comments
 (0)