Repository navigation
Releases
Releases · amol-/dukpy
0.6.0
New features and capabilities
- JavaScript engine migrated from Duktape to QuickJS-NG v0.11.0, with modern
JavaScript syntax and native Promise/job-queue support. - Added
dukpy.run(path, **kwargs)andJSInterpreter.run(path, **kwargs);
thedukpyCLI uses this file runner.run()supports native ESM static
import/export,import.meta.url,import.meta.main, and top-level
await. - File entrypoints use Node-like classification:
.mjsis ESM,.cjsis
CommonJS, and.jsfollows the nearestpackage.json"type"ofmodule
orcommonjs. Package-less ambiguous.jsfiles are probed by compiling the
CommonJS wrapper first, then native ESM; source text is not scanned. - The QuickJS CommonJS runtime supports
require,module,exports,
__filename, and__dirname. Its cache is shared with ESM/CommonJS interop,
and failed modules are removed so they can be retried. - ESM can import CommonJS: the default export is
module.exports; the only
named exports aremodule,exports, andrequire. Named exports are not
inferred from CommonJS source. - Node-like
fs,path,url,querystring, andpunycodeshims remain
available. - Promise microtasks drain before result serialization; Promise failures during
evaluation or serialization raiseJSRuntimeError. - Python callbacks preserve argument order and JSON types, support Unicode names
and Unicode/emoji values, mapNonereturns to JavaScriptundefined, and
turn missing callbacks and Python exceptions into catchableReferenceError
andInternalError, respectively. - Result conversion more closely follows
JSON.stringify:null,undefined,
NaN,Infinity, and-Infinitymap to PythonNone; circular references
and BigInt conversion failures raise runtime errors. - Stack exhaustion and oversized allocations raise runtime errors, Python signal
exceptions propagate, and blockingAtomics.waitis disabled. - The npm installer uses HTTPS for registry and tarball URLs; rejects unsafe tar
paths, path traversal, multiple roots, unsupported entries, and symlink
destination escapes; and reports missing metadata, versions, and tarball URLs
more clearly. - Bundled TypeScript was upgraded to 5.7.3.
No longer available and behavior changes
- Generic Babel support was removed:
dukpy.babel_compile,dukpy.webassets.BabelJS, and thebabeljsWebAssets filter are unavailable; bundled Babel remains only for JSX transpilation. - CoffeeScript support, including
dukpy.coffee_compile, was removed. - Duktape and its
Duktapeglobal,Duktape.modSearch, module system, error
wording, and stack formatting are gone; code relying on them must use DukPy's
QuickJS/CommonJS behavior and update exact-message expectations. - Python versions below 3.9 are unsupported; 0.6.0 requires Python
>=3.9,
and old Python 2 compatibility 8000 code is gone. - The old
dukpy/run.pymodule is removed. Usedukpy.run(...); code importing
mainfromdukpy.runbreaks. Thedukpyconsole command remains and now
targetsdukpy.cli:main. evaljs()remains script-only and does not auto-detect ESM syntax; run static
import/exportthroughdukpy.run()file entrypoints.- CommonJS module IDs now use canonical file-like IDs with extensions and
forward slashes, so exact oldmodule.idorrequire.idstrings may differ. require('x.mjs')andrequire()of.jsfiles classified as ESM fail; use
ESMimport/dukpy.run(). CommonJS named imports are unsupported unless they
aremodule,exports, orrequire; use the default import for its API.- Top-level functions and Symbols now raise
Invalid Result Value;undefined,
NaN, and infinities map toNone, and Duktape-specific or formerly{}
results may differ. - The installer rejects HTTP registry or tarball URLs, tarballs with symlinks,
path traversal, multiple roots, or unsupported entries, and symlinked
destinations.
Version 0.5.1
Version 0.5.0
What's Changed
- Upgrade duktape to 50af773 by @amol- in https://github.com/amol-/dukpy/pull/81
- Testing and binary distribution for Python 3.13
Full Changelog: 0.4.0...0.5.0
Version 0.4.0
What's Changed
- Build wheels for linux-aarch64 by @dknowles2 in https://github.com/amol-/dukpy/pull/77
- fix: prevent crash with unicode emoji (e.g. 🏠) by @robinvandernoord in https://github.com/amol-/dukpy/pull/78
- Switched to CESU-8 for encoding by @amol- in https://github.com/amol-/dukpy/pull/79
New Contributors
- @dknowles2 made their first contribution in https://github.com/amol-/dukpy/pull/77
- @robinvandernoord made their first contribution in https://github.com/amol-/dukpy/pull/78
Full Changelog: 0.3.1...0.4.0
Version 0.3.1
What's Changed
- Python 3.12 officially supported
- Emit the function name when Python callback fails by @pandasauce in https://github.com/amol-/dukpy/pull/72
New Contributors
- @pandasauce made their first contribution in https://github.com/amol-/dukpy/pull/72
Full Changelog: 0.3.0...0.3.1
Version 0.3.0
- Upgrade to duktape engine 2.7.0
- Support for installing nodejs modules where the root distribution directory is not named
package. - Better error message when a Python function is not found
- GitHub Actions based release workflow, wheels are now automatically generated for more versions.
Wheels for Apple Silicon (M1) are now provided. - Support for Python 2.7, 3.5 and 3.6 is deprecated. DukPy might still work, but it's untested.
wheels-test
Test release to verify wheels building and uploading
Version 0.2.3
- Support for Python 3.8
- Testuite now based on pytest instead of nose
- Deprecated support for Python 2.6 and 3.4
- Updated included babel version to 6.26.0
Version 0.2.2
Version 0.2.1
- State compatibility with Python 3.7
- Provide wheels for Python 3.7
- Fix building wheel from source distribution