Skip to content
This repository was archived by the owner on May 29, 2018. It is now read-only.
Merged
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
8 changes: 3 additions & 5 deletions .bin/srclib-javascript
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,9 @@ parser.command("graph")
// need to `npm install /src` from a dir other than /src to get `npm
// install` to do anything.


// TODO(sqs): only works for top-level package.jsons. we actually need
// "/src/${dirname(package.json path)", which also requires us to
// track the path to the package.json.
execFile("npm", ["install", "--ignore-scripts", "/src"], {cwd: "/"}, function(err, stdout, stderr) {
var packageDir = path.join("/src", commonJSPackage.Dir);
console.error("Installing npm package in dir", packageDir, "...");
execFile("npm", ["install", "--ignore-scripts", packageDir], {cwd: "/"}, function(err, stdout, stderr) {
if (stderr) console.error(stderr);
if (stdout) console.error(stdout);
if (err) {
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "testdata/case/minimal_nodejs_stdlib"]
path = testdata/case/minimal_nodejs_stdlib
url = https://github.com/sgtest/minimal_nodejs_stdlib.git
[submodule "testdata/case/js-misc"]
path = testdata/case/js-misc
url = https://github.com/sgtest/js-misc.git
9 changes: 9 additions & 0 deletions node_modules/jsg/annotate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions testdata/case/js-misc
Submodule js-misc added at 9c7837
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"Defs": [
{
"Path": "commonjs/srclib-issue-67/index.js",
"TreePath": "-commonjs/srclib-issue-67/index.js",
"Name": "srclib-issue-67/index",
"Kind": "module",
"File": "srclib-issue-67/index.js",
"DefStart": 0,
"DefEnd": 0,
"Exported": true,
"Data": {
"Kind": "commonjs-module",
"Key": {
"namespace": "commonjs",
"module": "srclib-issue-67/index.js",
"path": ""
},
"jsgDefData": {
"nodejs": {
"moduleExports": true
}
},
"Type": "{}",
"IsFunc": false
}
},
{
"Path": "file/srclib-issue-67/index.js/-/a",
"TreePath": "-file/srclib-issue-67/index.js/-/a",
"Name": "a",
"Kind": "var",
"File": "srclib-issue-67/index.js",
"DefStart": 4,
"DefEnd": 21,
"Exported": false,
"Data": {
"Kind": "var",
"Key": {
"namespace": "file",
"module": "srclib-issue-67/index.js",
"path": "a"
},
"Type": "{}",
"IsFunc": false
}
},
{
"Path": "file/srclib-issue-67/index.js/-/exports",
"TreePath": "-file/srclib-issue-67/index.js/-/exports",
"Name": "exports",
"Kind": "var",
"File": "",
"DefStart": 0,
"DefEnd": 0,
"Exported": false,
"Data": {
"Kind": "var",
"Key": {
"namespace": "file",
"module": "srclib-issue-67/index.js",
"path": "exports"
},
"Type": "{}",
"IsFunc": false
}
},
{
"Path": "file/srclib-issue-67/index.js/-/module/exports",
"TreePath": "-file/srclib-issue-67/index.js/-/module/exports",
"Name": "exports",
"Kind": "var",
"File": "",
"DefStart": 0,
"DefEnd": 0,
"Exported": false,
"Data": {
"Kind": "var",
"Key": {
"namespace": "file",
"module": "srclib-issue-67/index.js",
"path": "module.exports"
},
"Type": "{}",
"IsFunc": false
}
}
],
"Refs": [
{
"DefRepo": "",
"DefUnitType": "",
"DefUnit": "",
"DefPath": "commonjs/module.js/-/module/prototype/parent",
"Def": false,
"Repo": "",
"File": "srclib-issue-67/index.js",
"Start": 15,
"End": 21
},
{
"DefRepo": "",
"DefUnitType": "",
"DefUnit": "",
"DefPath": "file/srclib-issue-67/index.js/-/a",
"Def": true,
"Repo": "",
"File": "srclib-issue-67/index.js",
"Start": 4,
"End": 5
},
{
"DefRepo": "",
"DefUnitType": "",
"DefUnit": "",
"DefPath": "file/srclib-issue-67/index.js/-/module",
"Def": false,
"Repo": "",
"File": "srclib-issue-67/index.js",
"Start": 8,
"End": 14
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Name":"srclib-issue-67","Type":"CommonJSPackage","Repo":"github.com/sgtest/js-misc","Globs":null,"Files":["srclib-issue-67/index.js"],"Dir":"srclib-issue-67","Data":{"_id":"[email protected]","name":"srclib-issue-67","readme":"ERROR: No README data found!","version":"0.0.1"},"Config":{"jsg":{"plugins":{"node":{"coreModulesDir":"/tmp/node_core_modules"}}},"npmInstall":true},"Ops":{"depresolve":null,"graph":null}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"Defs": [
{
"Path": "commonjs/srclib-issue-67/index.js",
"TreePath": "-commonjs/srclib-issue-67/index.js",
"Name": "srclib-issue-67/index",
"Kind": "module",
"File": "srclib-issue-67/index.js",
"DefStart": 0,
"DefEnd": 0,
"Exported": true,
"Data": {
"Kind": "commonjs-module",
"Key": {
"namespace": "commonjs",
"module": "srclib-issue-67/index.js",
"path": ""
},
"jsgDefData": {
"nodejs": {
"moduleExports": true
}
},
"Type": "{}",
"IsFunc": false
}
},
{
"Path": "file/srclib-issue-67/index.js/-/a",
"TreePath": "-file/srclib-issue-67/index.js/-/a",
"Name": "a",
"Kind": "var",
"File": "srclib-issue-67/index.js",
"DefStart": 4,
"DefEnd": 21,
"Exported": false,
"Data": {
"Kind": "var",
"Key": {
"namespace": "file",
"module": "srclib-issue-67/index.js",
"path": "a"
},
"Type": "{}",
"IsFunc": false
}
},
{
"Path": "file/srclib-issue-67/index.js/-/exports",
"TreePath": "-file/srclib-issue-67/index.js/-/exports",
"Name": "exports",
"Kind": "var",
"File": "",
"DefStart": 0,
"DefEnd": 0,
"Exported": false,
"Data": {
"Kind": "var",
"Key": {
"namespace": "file",
"module": "srclib-issue-67/index.js",
"path": "exports"
},
"Type": "{}",
"IsFunc": false
}
},
{
"Path": "file/srclib-issue-67/index.js/-/module/exports",
"TreePath": "-file/srclib-issue-67/index.js/-/module/exports",
"Name": "exports",
"Kind": "var",
"File": "",
"DefStart": 0,
"DefEnd": 0,
"Exported": false,
"Data": {
"Kind": "var",
"Key": {
"namespace": "file",
"module": "srclib-issue-67/index.js",
"path": "module.exports"
},
"Type": "{}",
"IsFunc": false
}
}
],
"Refs": [
{
"DefRepo": "",
"DefUnitType": "",
"DefUnit": "",
"DefPath": "commonjs/module.js/-/module/prototype/parent",
"Def": false,
"Repo": "",
"File": "srclib-issue-67/index.js",
"Start": 15,
"End": 21
},
{
"DefRepo": "",
"DefUnitType": "",
"DefUnit": "",
"DefPath": "file/srclib-issue-67/index.js/-/a",
"Def": true,
"Repo": "",
"File": "srclib-issue-67/index.js",
"Start": 4,
"End": 5
},
{
"DefRepo": "",
"DefUnitType": "",
"DefUnit": "",
"DefPath": "file/srclib-issue-67/index.js/-/module",
"Def": false,
"Repo": "",
"File": "srclib-issue-67/index.js",
"Start": 8,
"End": 14
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Name":"srclib-issue-67","Type":"CommonJSPackage","Repo":"github.com/sgtest/js-misc","Globs":null,"Files":["srclib-issue-67/index.js"],"Dir":"srclib-issue-67","Data":{"_id":"[email protected]","name":"srclib-issue-67","readme":"ERROR: No README data found!","version":"0.0.1"},"Config":{"jsg":{"plugins":{"node":{"coreModulesDir":"$(JSG_DIR)/testdata/node_core_modules"}}},"npmInstall":false},"Ops":{"depresolve":null,"graph":null}}