rapydscript-ng 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/tools/fmt.mjs +7 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/tools/fmt.mjs
CHANGED
|
@@ -626,6 +626,13 @@ function is_visual_def_start(elements, idx) {
|
|
|
626
626
|
// reading src/lib/. Fall back to reading src/lib/ directly when the generated
|
|
627
627
|
// file is absent (e.g. running straight from the release/ tree).
|
|
628
628
|
var STDLIB_MODULES = (function () {
|
|
629
|
+
var em = globalThis.__rapydscript_embedded__;
|
|
630
|
+
if (em) {
|
|
631
|
+
if (em.stdlib_modules) return new Set(em.stdlib_modules);
|
|
632
|
+
if (em.stdlib) return new Set(Object.keys(em.stdlib)
|
|
633
|
+
.filter(function (n) { return n.slice(-4) === '.pyj'; })
|
|
634
|
+
.map(function (n) { return n.slice(0, -4); }));
|
|
635
|
+
}
|
|
629
636
|
try {
|
|
630
637
|
return new Set(JSON.parse(fs.readFileSync(
|
|
631
638
|
new URL('../dev/stdlib_modules.json', import.meta.url), 'utf-8')));
|