node-elm-compiler
Advanced tools
Comparing version 2.3.1 to 2.3.2
10
index.js
@@ -70,3 +70,3 @@ 'use strict'; | ||
// Elm file depends on, based on the modules it loads via `import`. | ||
function findAllDependencies(file, knownDependencies) { | ||
function findAllDependencies(file, knownDependencies, baseDir) { | ||
if (!knownDependencies) { | ||
@@ -76,4 +76,7 @@ knownDependencies = []; | ||
if (!baseDir) { | ||
baseDir = path.dirname(file); | ||
} | ||
return new Promise(function(resolve, reject) { | ||
var baseDir = path.dirname(file); | ||
@@ -97,3 +100,2 @@ fs.readFile(file, {encoding: "utf8"}, function(err, lines) { | ||
// e.g. ~/code/elm-css/src/Css/Declarations.elm | ||
// TODO need to handle Native .js files in here... | ||
var result = path.join(baseDir, dependencyLogicalName) | ||
@@ -135,3 +137,3 @@ | ||
return path.extname(dependency) === ".elm" ? | ||
findAllDependencies(dependency, newDependencies) : null; | ||
findAllDependencies(dependency, newDependencies, baseDir) : null; | ||
})); | ||
@@ -138,0 +140,0 @@ |
{ | ||
"name": "node-elm-compiler", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "A Node.js interface to the Elm compiler binaries. Supports Elm versions 0.15 - 0.16.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,2 +17,7 @@ # node-elm-compiler [![Version](https://img.shields.io/npm/v/node-elm-compiler.svg)](https://www.npmjs.com/package/node-elm-compiler) [![Travis build Status](https://travis-ci.org/rtfeldman/node-elm-compiler.svg?branch=master)](http://travis-ci.org/rtfeldman/node-elm-compiler) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/xv83jcomgb81i1iu/branch/master?svg=true)](https://ci.appveyor.com/project/rtfeldman/node-elm-compiler/branch/master) | ||
## 2.3.2 | ||
Fix bug related to converting module dots to directories in nested dependency | ||
resolution. | ||
## 2.3.1 | ||
@@ -19,0 +24,0 @@ |
@@ -16,3 +16,3 @@ var assert = require("chai").assert; | ||
results, | ||
[ "ChildA.elm", "ChildB.elm", "Native/Child.js" ].map(prependFixturesDir) | ||
[ "Test/ChildA.elm", "Test/ChildB.elm", "Native/Child.js" ].map(prependFixturesDir) | ||
); | ||
@@ -26,3 +26,3 @@ }); | ||
results, | ||
[ "ChildA.elm", "NestedChild.elm", "ChildB.elm", "Native/Child.js" ].map(prependFixturesDir) | ||
[ "Test/ChildA.elm", "Test/Sample/NestedChild.elm", "Test/ChildB.elm", "Native/Child.js" ].map(prependFixturesDir) | ||
); | ||
@@ -29,0 +29,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16847
279
46