gosling.js
gosling.js copied to clipboard
chore: update generic-filehandle to v3
Updates generic-filehandle
to latest version with https://github.com/GMOD/generic-filehandle/pull/103
Checklist
- [x] Ensure the PR works with all demos on the online editor
- [ ] Unit tests added or updated
- [ ] Examples added or updated
- [ ] Documentation updated (e.g., added API functions)
- [ ] Screenshots for visual changes (e.g., new encoding support or UI change on Editor)
I'm not getting the same error. yarn build
? I think this could be due to @gmod/bbi-js
using a default
import from generic-filehandle
.
Yes, I get an error when I run yarn
and then yarn build
:
Full Error Message
yarn build
yarn run v1.22.19
$ run-s build-clear build-types build-lib
$ rm -rf ./dist
$ tsc --emitDeclarationOnly -p tsconfig.build.json
$ vite build --mode lib && node scripts/build-umd && node scripts/build-embed
vite v2.9.5 building for lib...
✓ 1891 modules transformed.
✓ 2012 modules transformed.
✓ 536 modules transformed.
rendering chunks (1)...Sourcemap is likely to be incorrect: a plugin (at position 12) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
Sourcemap is likely to be incorrect: a plugin (at position 12) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
dist/assets/vcf-worker.7d6e5fc7.js.map 848.86 KiB
dist/assets/bam-worker.89a607cc.js.map 1488.45 KiB
dist/gosling.es.js 3196.71 KiB / gzip: 585.64 KiB
dist/gosling.es.js.map 2936.59 KiB
> dist/gosling.es.js:18:7: error: No matching export in "node_modules/generic-filehandle/esm/index.js" for import "default"
18 │ import require$$7, { RemoteFile as RemoteFile$1 } from "generic-filehandle";
╵ ~~~~~~~~~~
/Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:1475
let error = new Error(`${text}${summary}`);
^
Error: Build failed with 1 error:
dist/gosling.es.js:18:7: error: No matching export in "node_modules/generic-filehandle/esm/index.js" for import "default"
at failureErrorWithLog (/Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:1475:15)
at /Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:1133:28
at runOnEndCallbacks (/Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:1051:65)
at buildResponseToResult (/Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:1131:7)
at /Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:1240:14
at /Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:611:9
at handleIncomingPacket (/Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:708:9)
at Socket.readFromStdout (/Users/sehilyi/Documents/gosling/gosling.js/node_modules/esbuild/lib/main.js:578:7)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12) {
errors: [
{
detail: undefined,
location: {
column: 7,
file: 'dist/gosling.es.js',
length: 10,
line: 18,
lineText: 'import require$$7, { RemoteFile as RemoteFile$1 } from "generic-filehandle";',
namespace: '',
suggestion: ''
},
notes: [],
pluginName: '',
text: 'No matching export in "node_modules/generic-filehandle/esm/index.js" for import "default"'
}
],
warnings: []
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build-lib" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Ah, I think you are right. In dist/gosling.es.js
, require$$7
is used only for bbi
:
import require$$7, { RemoteFile as RemoteFile$1 } from "generic-filehandle";
// ^^^^^^^^^^ No matching export in "node_modules/generic-filehandle/esm/index.js" for import "default
// ...
var _genericFilehandle = require$$7;
// ...
if (filehandle) {
this.bbi = filehandle;
} else if (url) {
this.bbi = new _genericFilehandle.RemoteFile(url);
} else if (path) {
this.bbi = new _genericFilehandle.LocalFile(path);
} else {
throw new Error("no file given");
}
Would be great to revisit this PR and many others related to updating dependencies...
Maybe we just need to upgrade @gmod/bbi-js
as well. Its version pinned in our package.json
is ^1.0.30
which is way behind the current version (v3.0.0
).