Skip to content

Commit fbd4685

Browse files
anonrigaduh95
authored andcommitted
fixup! deps: update merve to 1.2.0
1 parent 3c78a76 commit fbd4685

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

deps/merve/BUILD.gn

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
##############################################################################
2+
# #
3+
# DO NOT EDIT THIS FILE! #
4+
# #
5+
##############################################################################
6+
7+
# This file is used by GN for building, which is NOT the build system used for
8+
# building official binaries.
9+
# Please modify the gyp files if you are making changes to build system.
10+
11+
import("unofficial.gni")
12+
13+
merve_gn_build("merve") {
14+
}

deps/merve/unofficial.gni

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file is used by GN for building, which is NOT the build system used for
2+
# building official binaries.
3+
# Please edit the gyp files if you are making changes to build system.
4+
5+
# The actual configurations are put inside a template in unofficial.gni to
6+
# prevent accidental edits from contributors.
7+
template("merve_gn_build") {
8+
config("merve_config") {
9+
include_dirs = [ "." ]
10+
}
11+
gypi_values = exec_script("../../tools/gypi_to_gn.py",
12+
[ rebase_path("merve.gyp") ],
13+
"scope",
14+
[ "merve.gyp" ])
15+
source_set(target_name) {
16+
forward_variables_from(invoker, "*")
17+
public_configs = [ ":merve_config" ]
18+
sources = gypi_values.merve_sources
19+
}
20+
}

src/node_cjs_lexer.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
#include "merve.h"
88

9+
#ifdef MERVE_ERROR_TODO
10+
#define DOT_NAME(exp) (exp.name)
11+
#else
12+
#define DOT_NAME(exp) (exp)
13+
#endif
14+
915
namespace node {
1016
namespace cjs_lexer {
1117

@@ -71,14 +77,14 @@ void Parse(const FunctionCallbackInfo<Value>& args) {
7177
// Convert exports to JS Set
7278
Local<Set> exports_set = Set::New(isolate);
7379
for (const auto& exp : analysis.exports) {
74-
exports_set->Add(context, CreateString(isolate, exp.name)).ToLocalChecked();
80+
exports_set->Add(context, CreateString(isolate, DOT_NAME(exp))).ToLocalChecked();
7581
}
7682

7783
// Convert reexports to JS array using batch creation
7884
LocalVector<Value> reexports_vec(isolate);
7985
reexports_vec.reserve(analysis.re_exports.size());
8086
for (const auto& reexp : analysis.re_exports) {
81-
reexports_vec.push_back(CreateString(isolate, reexp.name));
87+
reexports_vec.push_back(CreateString(isolate, DOT_NAME(reexp)));
8288
}
8389

8490
// Create result array [exports (Set), reexports (Array)]

0 commit comments

Comments
 (0)