Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 11cb13b

Browse files
committedNov 20, 2023
BREAKING CHANGE: Avoid collisions between static class/namespace members
This commit changes the delimiter between namespaces and their members from "." to "::" in internal names. The new delimiter certainly feels very un-JavaScript-y, but the meaning is still recognizable, and these names aren't exposed to users in most cases anyway. Still, this is a breaking change, as it affects the import names for `declare namespace` members (as seen in tests/compiler/declare.js), and transform authors will also need to update their code accordingly. Fixes AssemblyScript#2793.
1 parent d142ac8 commit 11cb13b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4140
-4117
lines changed
 

‎lib/loader/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ export function demangle(exports, extendedExports = {}) {
371371
: exports["__setArgumentsLength"] || exports["__setargc"] || (() => { /* nop */ });
372372
for (let internalName of Object.keys(exports)) {
373373
const elem = exports[internalName];
374-
let parts = internalName.split(".");
374+
let parts = internalName.split(/\.|::/g);
375375
let curr = extendedExports;
376376
while (parts.length > 1) {
377377
let part = parts.shift();

‎src/builtins.ts

+509-509
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)