Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@

# builtins may be removed later if they have been disabled by options
shareable_builtins = {'undici/undici': 'deps/undici/undici.js',
'amaro/dist/index': 'deps/amaro/dist/index.js'
'amaro/dist/index': 'deps/amaro/dist/index.js',
'amaro/dist/nodejs': 'deps/amaro/dist/nodejs.js',
'amaro/dist/transform': 'deps/amaro/dist/transform.js',
'amaro/lib/wasm': 'deps/amaro/lib/wasm.js',
}

# create option groups
Expand Down Expand Up @@ -2990,7 +2993,9 @@ def make_bin_override():

# remove builtins that have been disabled
if options.without_amaro:
del shareable_builtins['amaro/dist/index']
for builtin in list(shareable_builtins):
if builtin.startswith('amaro/'):
del shareable_builtins[builtin]

# configure shareable builtins
output['variables']['node_builtin_shareable_builtins'] = []
Expand Down
2 changes: 1 addition & 1 deletion deps/amaro/dist/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
32 changes: 30 additions & 2 deletions deps/amaro/dist/errors.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
"use strict";
export function isSwcError(error) {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var errors_exports = {};
__export(errors_exports, {
isSwcError: () => isSwcError,
wrapAndReThrowSwcError: () => wrapAndReThrowSwcError
});
module.exports = __toCommonJS(errors_exports);
function isSwcError(error) {
return error.code !== void 0;
}
export function wrapAndReThrowSwcError(error) {
function wrapAndReThrowSwcError(error) {
const errorHints = `${error.filename}:${error.startLine}
${error.snippet}
`;
Expand All @@ -22,3 +45,8 @@ ${error.snippet}
throw new Error(error.message);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isSwcError,
wrapAndReThrowSwcError
});
2 changes: 1 addition & 1 deletion deps/amaro/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { transformSync } from "./transform.ts";
export { transformSync } from "./transform.js";
Loading
Loading