-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(core): update build #977
Changes from 26 commits
dd65e2f
26ef52f
e8b9a8f
857889a
fbc4b01
923ba98
dc9fbe3
f327ae5
2a14b63
289aff2
8621b94
77d7753
8ec6610
1f6de35
5586b72
ed8caa7
394de59
2f0334c
a877e67
1a926ee
c79ebbe
e981887
4cb8c7b
8223c30
415d8ab
6997405
17fd4dc
ca8eea2
2894aa2
1e4a694
f1046ac
fbac45e
b88c3ef
ed1e6b7
c862ce0
562e46d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
etowahadams marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"entry": ["./src/index.ts", "./editor/index.tsx", "scripts/setup-vitest.js"], | ||
"project": ["**/*.ts", "**/*.tsx"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,21 +8,24 @@ | |
"url": "https://github.com/gosling-lang/gosling.js" | ||
}, | ||
"homepage": "https://gosling-lang.github.io/gosling.js/", | ||
"main": "dist/gosling.js", | ||
"main": "dist/gosling.es.js", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "main" applies to both ES module and CJS module entry points. There is no |
||
"module": "dist/gosling.es.js", | ||
"types": "dist/src/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"type": "module", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding of this is that with the exception of some configs, we want all files to be treated as ESM so we use this option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup! Making things work nice (like Vite) might require upgrading those deps. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense! I did try upgrading Vite before, but it we're using a plugin (@vitejs/plugin-react-refresh) which requires this version of vite. However, I didn't realize until now that the package is now deprecated in favor of @vitejs/plugin-react. I'll switch to @vitejs/plugin-react and upgrade vite if that sounds good! |
||
"exports": { | ||
".": "./dist/gosling.es.js", | ||
"./embed": "./dist/embed/index.js" | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./dist/gosling.es.js" | ||
} | ||
}, | ||
"scripts": { | ||
"start": "vite --mode editor", | ||
"start-embed": "vite", | ||
"build": "run-s build-clear build-types build-lib", | ||
"build-lib": "vite build --mode lib && node scripts/build-umd && node scripts/build-embed", | ||
"build-lib": "vite build --mode lib", | ||
"build-types": "tsc --emitDeclarationOnly -p tsconfig.build.json", | ||
"build-editor": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build", | ||
"build-clear": "rm -rf ./dist", | ||
|
@@ -34,27 +37,21 @@ | |
"schema": "node scripts/generate-schemas.mjs", | ||
"predeploy": "yarn build-editor; echo \"gosling.js.org\" >> build/CNAME", | ||
"deploy": "gh-pages -d build", | ||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md" | ||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", | ||
"knip": "knip --config knip.config.json" | ||
etowahadams marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"peerDependencies": { | ||
"pixi.js": "^6.3.0", | ||
"react": "^16.6.3 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^16.6.3 || ^17.0.0 || ^18.0.0" | ||
}, | ||
"sideEffect": false, | ||
"dependencies": { | ||
"@gmod/bam": "^1.1.18", | ||
"@gmod/bbi": "^3.0.1", | ||
"@gmod/bed": "^2.1.2", | ||
"@gmod/gff": "^1.3.0", | ||
"@gmod/tabix": "^1.5.6", | ||
"@gmod/vcf": "^5.0.10", | ||
"@types/bezier-js": "^4.1.0", | ||
"@types/d3": "^7.0.0", | ||
"@types/lodash": "^4.14.151", | ||
"@types/node": "^18.6.2", | ||
"@types/rbush": "^3.0.0", | ||
"@types/uuid": "^8.3.1", | ||
etowahadams marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"allotment": "^1.19.0", | ||
"bezier-js": "4.0.3", | ||
"buffer": "^6.0.3", | ||
|
@@ -75,23 +72,23 @@ | |
"json-stringify-pretty-compact": "^2.0.0", | ||
"jspdf": "^2.3.1", | ||
"lodash-es": "^4.17.21", | ||
"mixwith": "^0.1.1", | ||
"nanoevents": "^7.0.1", | ||
"pubsub-js": "^1.9.3", | ||
"quick-lru": "^6.1.1", | ||
"rbush": "^3.0.1", | ||
"react-grid-layout": "^1.2.5", | ||
"stream-browserify": "^3.0.0", | ||
"threads": "^1.6.4", | ||
"uuid": "^8.3.2" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/react": "^10.4.8", | ||
"@testing-library/user-event": "^12.1.1", | ||
"@types/bezier-js": "^4.1.0", | ||
"@types/d3": "^7.0.0", | ||
"@types/d3-drag": "^2.0.0", | ||
"@types/d3-dsv": "^3.0.1", | ||
"@types/d3-request": "^1.0.6", | ||
"@types/d3-selection": "^2.0.0", | ||
"@types/node": "^18.6.2", | ||
"@types/rbush": "^3.0.0", | ||
"@types/uuid": "^8.3.1", | ||
"@types/lodash-es": "^4.17.5", | ||
"@types/pubsub-js": "^1.8.2", | ||
"@types/react": "^18.2.0", | ||
|
@@ -104,10 +101,8 @@ | |
"ajv": "^6.12.2", | ||
"c8": "^7.11.2", | ||
"conventional-changelog-cli": "^2.1.1", | ||
"cross-fetch": "^3.1.5", | ||
"d3-drag": "^2.0.0", | ||
"d3-selection": "^2.0.0", | ||
"documentation": "^13.0.2", | ||
"esbuild": "^0.12.25", | ||
"eslint": "^8.19.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
|
@@ -116,10 +111,10 @@ | |
"eslint-plugin-react": "^7.30.1", | ||
"fetch-jsonp": "^1.1.3", | ||
"gh-pages": "^3.1.0", | ||
"git-branch-is": "^4.0.0", | ||
"jest-canvas-mock": "^2.3.0", | ||
"jsdom": "^19.0.0", | ||
"jsoncrush": "^1.1.6", | ||
"knip": "^2.30.0", | ||
"npm-run-all": "^4.1.5", | ||
"pixi.js": "^6.3.0", | ||
"prettier": "^2.0.5", | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only question I have here is whether the version of higlass and gosling.js will stay in sync over time. Unfortunately the names used in the styles are specific to the higlass version, so I don't know if there could be a case where higlass makes a patch (e.g., v1.11.8) but we have styles from 1.11.7 in our template and the two end up out of sync. I wonder if it's possible to do something like:
but I'm not sure if the
deps
is handled whenbundle
is used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use different react and react-dom versions as well that user wishes to use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question. Ideally you could bundle and override dependency versions, but I'm not sure for ESM.sh if that is current possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested. Unfortunately, it seems to ignore the version of the dependencies. I tried using a lower version of HiGlass and I still got
HiGlass v1.12.4: http://higlass.io/
in the console. What I'll try next is to use the pre-bundled peer dependencies in an import map.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have any luck using unbundled gosling.js with bundled peer dependencies either using an importmap.
The problem seems to be that HiGlass has
"pixi.js": "^5.0.3"
as a peer dependency. One of the pixi subpackages called@pixi/polyfill
relies on a package calledes6-promise-polyfill
which doesn't have the export that @pixi/polyfill expects. Thus I get aThe requested module '/v133/[email protected]/es2022/es6-promise-polyfill.mjs' does not provide an export named 'Polyfill'
error when trying to import HiGlass.Looking at that version of es6-promise-pollyfill it does look like there is export called Polyfill but I don't think it gets converted in a way that is accessible in the ESM version that esm.sh generates.
How hard it would it be to upgrade the pixi version that HiGlass uses to v6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a PR to HiGlass to upgrade Pixi #977