node-elm-compiler
Advanced tools
Comparing version 4.1.3 to 4.1.4
@@ -75,3 +75,3 @@ 'use strict'; | ||
return new Promise(function(resolve, reject) { | ||
var matches = line.match(/^module\s+([^\s]+)/); | ||
var matches = line.match(/^(?:port\s+)?module\s+([^\s]+)/); | ||
@@ -92,3 +92,3 @@ if (matches) { | ||
return resolve(path.normalize(path.dirname(file) + trimmedBackedOut)); | ||
} else if (!line.match(/^module\s/)) { | ||
} else if (!line.match(/^(?:port\s+)?module\s/)) { | ||
// Technically you're allowed to omit the module declaration for | ||
@@ -95,0 +95,0 @@ // beginner applications where it'd just be `module Main exposing (..)` |
{ | ||
"name": "node-elm-compiler", | ||
"version": "4.1.3", | ||
"version": "4.1.4", | ||
"description": "A Node.js interface to the Elm compiler binaries. Supports Elm version 0.17", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,2 +17,6 @@ # 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) | ||
## 4.1.4 | ||
`findAllDependencies` now supports `port module` files. | ||
## 4.1.3 | ||
@@ -19,0 +23,0 @@ |
@@ -19,3 +19,11 @@ var expect = require("chai").expect; | ||
it("works for a file with three dependencies", function () { | ||
it("works for a port module with three dependencies", function () { | ||
return compiler.findAllDependencies(prependFixturesDir("ParentWithPort.elm")).then(function(results) { | ||
expect(results).to.deep.equal( | ||
[ "Test/ChildA.elm", "Test/ChildB.elm", "Native/Child.js" ].map(prependFixturesDir) | ||
); | ||
}); | ||
}); | ||
it("works for a non-port module with three dependencies", function () { | ||
return compiler.findAllDependencies(prependFixturesDir("Parent.elm")).then(function(results) { | ||
@@ -22,0 +30,0 @@ expect(results).to.deep.equal( |
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
29029
30
574
82