Skip to content
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

ESM version of the runtime is broken #24

Closed
RReverser opened this issue Jan 13, 2023 · 2 comments
Closed

ESM version of the runtime is broken #24

RReverser opened this issue Jan 13, 2023 · 2 comments

Comments

@RReverser
Copy link
Contributor

ESM version of the runtime (https://unpkg.com/@tybys/emnapi-runtime@0.25.0/dist/emnapi.mjs) currently has this code, seems like a leftover from something that assumed it will be generated as CommonJS:

...

Object.defineProperty(exports, 'version', {
    configurable: true,
    enumerable: true,
    writable: false,
    value: "0.25.0"
});

export { CallbackInfo, CallbackInfoStack, ConstHandle, Context, Deferred, DeferredStore, EmnapiError, Env, EnvStore, Finalizer, Handle, HandleScope, HandleStore, NotSupportBigIntError, NotSupportWeakRefError, Ownership, Persistent, RefBase, RefStore, RefTracker, Reference, ScopeStore, Store, TryCatch, createContext, isReferenceType };

Trying to import it results in ReferenceError: exports is not defined.

@toyobayashi
Copy link
Owner

publishing 0.25.1

@toyobayashi
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants