Comments (5)
@postspectacular
Thanks so much for looking into this! Looks like the esm.run
links do indeed work as a drop-in replacement :D
Will have to look into this, since this likely will impact alot of other packages... Do you know if that's only a recent issue or is it your first time trying out the skypack version?
Also yeah, first time trying to use the skypack version.
from umbrella.
Yeah, looking at https://cdn.skypack.dev/@thi.ng/rstream/stream, it seems skypack defaults to ES2019 syntax and hence will transpile & inject the class field initializers:
/*
* Skypack CDN - @thi.ng/[email protected]
*
* Learn more:
* 📙 Package Documentation: https://www.skypack.dev/view/@thi.ng/rstream
* 📘 Skypack Documentation: https://www.skypack.dev/docs
*
* Pinned URL: (Optimized for Production)
* ▶️ Normal: https://cdn.skypack.dev/pin/@thi.ng/[email protected]/mode=imports/optimized/@thi.ng/rstream/stream.js
* ⏩ Minified: https://cdn.skypack.dev/pin/@thi.ng/[email protected]/mode=imports,min/optimized/@thi.ng/rstream/stream.js
*
*/
// Browser-Optimized Imports (Don't directly import the URLs below in your application!)
export * from '/-/@thi.ng/[email protected]/dist=es2019,mode=imports/optimized/@thi.ng/rstream/stream.js';
export {default} from '/-/@thi.ng/[email protected]/dist=es2019,mode=imports/optimized/@thi.ng/rstream/stream.js';
I tried manually adding ?dist=es2022
but that doesn't seem to have any effect. Need to do more reading...
from umbrella.
@snosenzo I think I will switch all docs to use https://www.jsdelivr.com. So you just need to replace:
https://cdn.skypack.dev/@thi.ng/rstream
...with:
https://esm.run/@thi.ng/rstream
(A quick look at the returned code there, it seems they thankfully don't mess around with transpilation to older syntax, at least not in the above way...)
from umbrella.
Hi @snosenzo - thank you for reporting this! It indeed seems to be a transpilation issue with skypack. The JS emitted by TypeScript (and the code distributed in the package) currently should look like this:
class Stream extends Subscription {
src;
_cancel;
_inited;
constructor(src, opts) {
const [_src, _opts] = isFunction(src) ? [src, opts || {}] : [void 0, src || {}];
super(
_opts.error ? { error: _opts.error } : void 0,
__optsWithID("stream", _opts)
);
this.src = _src;
this._inited = false;
}
Will have to look into this, since this likely will impact alot of other packages... Do you know if that's only a recent issue or is it your first time trying out the skypack version?
from umbrella.
@snosenzo Also hmmm.... this might explain the issue: skypackjs/skypack-cdn#365 - looks like this whole CDN project is possibly abandoned (and hence maybe also no ES2022 support???), but no official word to be found and I'm personally not really using it (so didn't notice so far....)
from umbrella.
Related Issues (20)
- [shader-ast] Dependency for ternary operators, while and for loop HOT 1
- [shader-ast] Array texture types are missing HOT 1
- [shader-ast] Missing matrix types HOT 1
- [shader-ast] Better design for `defn` with anonymous qualified arguments HOT 7
- [malloc] Multi-threaded allocations HOT 4
- Prototype Pollution vulnerability affecting @thi.ng/paths, versions <=5.1.62 HOT 7
- [hiccup-canvas] "packedPolyline" needs separate implementation or packedPoly needs to accept stride options?
- [color] ? [binary] Comparison with -0 using the "===" operator will also match 0 [equals-negative-zero] HOT 2
- RDMS based on rstream-query HOT 1
- [examples] Issue running the examples (failed to resolve entry for package) HOT 3
- [hiccup-svg] hiccup-svg's attributes don't seem to handle rstream HOT 7
- [geom-accel] SpatialGrid2 hangs runtime when using `set` method HOT 3
- Polygons with holes? HOT 8
- [shader-ast] "Building a shader graph editor (WebGL, shader AST transpiler, UI)" HOT 2
- [rdom] Issue understanding $klist HOT 4
- [geom] update polymorphic function signatures to provide better return types
- [atom & rstream] Asking for advice on good practices
- [rdom] SVG el add class > Uncaught (in promise) TypeError HOT 1
- [rdom] Error: illegal state: operation not allowed in state 3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umbrella.