You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fix dependency referrer null pointer
- s/module/mod/g for variable names
- include yallist in webpack example (needed to avoid this bug)
- update .travis.yml to current version 0.24.0
- Upgrade node to 8.15.1
- Upgrade yarn to 1.15.2
- Fix a bug in generated node_binary rules (for labels with special characters)
- Remove polymer-cli example from CI unit tests (not working ATM)
// And a mapping for backreferences mapped by name
127
-
constbackrefs=newMap();
128
126
129
127
// Build the adjacencyList
130
128
nodes.forEach((node,index)=>{
131
129
constlist=[];
132
130
edges[index]=list;
133
-
constentry=byName.get(node);
131
+
constentry=byName.get(node);// get the module by name
134
132
// Make a set of deps rather than using the entry.dependencies
135
133
// mapping.
136
134
entry.deps=newSet();
137
135
138
136
if(entry.dependencies){
139
-
137
+
140
138
Object.keys(entry.dependencies).forEach(name=>{
141
139
142
140
// Save this in the deps set
143
141
constdependency=byName.get(name);
142
+
if(!dependency){
143
+
thrownewReferenceError(`# For module ${entry.name}${entry.version}: for some reason the module for transitive dependency ${name} was not included. Please add it manually to your list of top-level dependencies (rule yarn_modules.deps attribute) .`);
144
+
}
144
145
entry.deps.add(dependency);
145
146
146
147
// Populate the adjacency list
@@ -246,8 +247,7 @@ function parseName(key, entry) {
246
247
constat=key.indexOf("@",1);
247
248
entry.name=key.slice(0,at);
248
249
249
-
constlabel=entry.name.replace('@','at-');
250
-
entry.label=label;
250
+
entry.label=entry.name.replace('@','at-');
251
251
}
252
252
253
253
@@ -283,26 +283,26 @@ function printJson(entry) {
283
283
/**
284
284
* Given a module, print a skylark `node_module` rule.
285
285
*/
286
-
functionprintNodeModule(module){
287
-
constdeps=module.deps;
286
+
functionprintNodeModule(mod){
287
+
constdeps=mod.deps;
288
288
289
289
print(``);
290
-
printJson(module);
290
+
printJson(mod);
291
291
print(`node_module(`);
292
-
print(` name = "${module.yarn ? module.yarn.label : module.name}",`);
292
+
print(` name = "${mod.yarn ? mod.yarn.label : mod.name}",`);
0 commit comments