Skip to content
This repository was archived by the owner on Dec 4, 2022. 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [unreleased]

## [2.1.2-dev.1] - 2019-09-20

- avoid recognizing any require/import starts with `.` as a custom-resolve-module on Windows

## [2.1.1] - 2019-08-14

- remove angular dependencies. use typescript compiler to parse Angular Decorators
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bit-javascript",
"version": "2.1.1",
"version": "2.1.2-dev.1",
"scripts": {
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"lint": "eslint src && flow check || true",
Expand Down
11 changes: 6 additions & 5 deletions src/dependency-builder/filing-cabinet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,7 @@ function commonJSLookup(options: Options) {

appModulePath.addPath(moduleLookupDir);

// Make sure the partial is being resolved to the filename's context
// 3rd party modules will not be relative
let partial = options.partial;
if (partial[0] === '.') {
partial = path.resolve(path.dirname(filename), partial);
}

let result = '';

Expand All @@ -314,6 +309,12 @@ function commonJSLookup(options: Options) {
debug('failed resolved using resolveConfig, fall back to the standard resolver');
}

// Make sure the partial is being resolved to the filename's context
// 3rd party modules will not be relative
if (partial[0] === '.') {
partial = path.resolve(path.dirname(filename), partial);
}

try {
result = resolve.sync(partial, {
extensions: resolveExtensions,
Expand Down