Skip to content

Commit

Permalink
Respect Windows Path Separators in isRxJSImport
Browse files Browse the repository at this point in the history
Resolves #139
  • Loading branch information
swissmanu committed Dec 8, 2021
1 parent 2276fe2 commit 1cdb157
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Install the latest version from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=manuelalabor.rxjs-debugging-for-vs-code).

## 1.1.1

- Bugfix: RxJS is not detected on Windows Systems [#139](https://github.com/swissmanu/rxjs-debugging-for-vscode/issues/139)

## 1.1.0

- Improvement: Support for Plain JavaScript [#126](https://github.com/swissmanu/rxjs-debugging-for-vscode/issues/126)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add non-intrusive debugging capabilities for [RxJS](https://rxjs.dev/) applicati
- [Node.js 12](https://nodejs.org/) or newer
- To debug Webpack-based web applications:
- [Webpack 5.60.0](https://webpack.js.org/) or newer
- The [@rxjs-debugging/runtime-webpack](https://www.npmjs.com/package/@rxjs-debugging/runtime-webpack) Webpack plugin
- The latest [@rxjs-debugging/runtime-webpack](https://www.npmjs.com/package/@rxjs-debugging/runtime-webpack) Webpack plugin (see [here](https://www.npmjs.com/package/@rxjs-debugging/runtime-webpack) for setup instructions)

## Usage

Expand Down
1 change: 1 addition & 0 deletions packages/runtime/src/utils/isRxJSImport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('Runtime', () => {
[true, '/node_modules/rxjs/internal/Observable.js'],
[true, '/node_modules/rxjs/internal/Observable'],
[true, 'rxjs/internal/Observable'],
[true, 'C:\\projects\\rxjsdebugger\\rxjs\\internal\\Observable.js'],
[false, 'rxjs'],
[false, 'rxjs/Observable'],
[false, 'Observable'],
Expand Down
3 changes: 2 additions & 1 deletion packages/runtime/src/utils/isRxJSImport.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const OBSERVABLE_MODULE_REGEX = /rxjs\/(dist\/|esm\/|esm5\/|_esm5\/|_esm2015\/|cjs\/)*internal\/Observable(\.js)?$/;
const OBSERVABLE_MODULE_REGEX =
/rxjs(\/|\\)(dist(\/|\\)|esm(\/|\\)|esm5(\/|\\)|_esm5(\/|\\)|_esm2015(\/|\\)|cjs(\/|\\))*internal(\/|\\)Observable(\.js)?$/;

/**
* Tests if a given path is leads to RxJS' `Observable.js` file.
Expand Down

0 comments on commit 1cdb157

Please sign in to comment.