Skip to content

Commit 3399b44

Browse files
fix: upgrade web stream tools to v0.20
1 parent b374c65 commit 3399b44

File tree

6 files changed

+72
-12
lines changed

6 files changed

+72
-12
lines changed

conf/tsconfig.content_scripts.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"strictFunctionTypes": false,
1414
"sourceMap": false,
1515
"checkJs": false,
16-
"moduleResolution": "node",
16+
"moduleResolution": "bundler",
1717
"outDir": "../build/_/content_scripts",
1818
"baseUrl": "../extension",
1919
"paths": {
2020
"dompurify": ["../node_modules/dompurify/dist/purify.cjs.d.ts"],
2121
"openpgp": ["../node_modules/openpgp/openpgp.d.ts"],
22-
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/index.d.ts"],
22+
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/types/index.d.ts"],
2323
"squire-rte": ["../node_modules/squire-rte/dist/types/Squire.d.ts"],
2424
"undici-types": ["../node_modules/undici-types/index.d.ts", "COMMENT"],
2525
"linkifyHtml": ["../node_modules/linkify-html/dist/linkify-html.d.mts", "COMMENT"],

conf/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"outDir": "../build/test",
1313
"skipLibCheck": true,
1414
"paths": {
15-
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/index.d.ts", "../build/generic-extension-wip/lib/streams_common.js"]
15+
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/types/index.d.ts", "../build/generic-extension-wip/lib/streams_common.js"]
1616
}
1717
},
1818
"files": [

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"graceful-fs": "4.1.13"
77
},
88
"devDependencies": {
9-
"@openpgp/web-stream-tools": "0.1.3",
9+
"@openpgp/web-stream-tools": "0.2.0",
1010
"@types/chai": "4.3.19",
1111
"@types/chai-as-promised": "7.1.8",
1212
"@types/chrome": "0.1.24",

scripts/build.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ const main = async () => {
121121
// patch imports with .js, e.g. replace './streams' with './streams.js'
122122
// until https://github.com/openpgpjs/web-stream-tools/pull/20 is resolved
123123
const streamDir = path.join(OUTPUT_DIRECTORY, 'lib/streams');
124-
const streamFiles = fs.readdirSync(streamDir).map(file => path.join(streamDir, file));
124+
const streamFiles = fs.readdirSync(streamDir)
125+
.map(file => path.join(streamDir, file))
126+
.filter(filePath => fs.statSync(filePath).isFile());
125127
applyRegexReplace(/'(.\/(streams|util|writer|reader|node-conversions))'/g, "'$1.js'", streamFiles);
126128

127129
// patch isUint8Array until https://github.com/openpgpjs/web-stream-tools/pull/23 is resolved

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"useUnknownInCatchVariables": false,
1414
"outDir": "build/generic-extension-wip",
1515
"baseUrl": "./extension",
16-
"moduleResolution": "node",
16+
"moduleResolution": "bundler",
1717
"paths": {
1818
"jquery": ["lib/jquery.min.js", "COMMENT"],
1919
"sweetalert2": ["lib/sweetalert2.js", "COMMENT"],
2020
"openpgp": ["lib/openpgp.min.mjs", "../node_modules/openpgp/openpgp.d.js"],
2121
"pdfjs": ["lib/pdf.min.mjs", "types/pdf.js.d.ts"],
2222
"squire-rte": ["../node_modules/squire-rte/dist/types/Squire.d.ts"],
23-
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/index.d.ts", "lib/streams/streams.js"],
23+
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/types/index.d.ts", "lib/streams/streams.js"],
2424
"dompurify": ["../node_modules/dompurify/dist/purify.cjs.d.ts", "lib/purify.js", "COMMENT"],
2525
"fine-uploader": ["lib/fine-uploader.js", "COMMENT"],
2626
"filesize": ["lib/filesize.js", "../node_modules/filesize/types/filesize.d.ts"],

0 commit comments

Comments
 (0)