Skip to content

Commit 7e9bfe4

Browse files
committed
switch to upath for consistent path behavior across os platforms
1 parent 2e6efd4 commit 7e9bfe4

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,8 @@
105105
"glob": "^8.1.0",
106106
"mocha": "^10.2.0",
107107
"typescript": "^5.1.3"
108+
},
109+
"dependencies": {
110+
"upath": "^2.0.1"
108111
}
109-
}
112+
}

src/CellStatusProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import path = require('path');
1+
const path = require('upath');
22
import * as vscode from 'vscode';
33
import { EXTENSION_ID } from './utils';
44

src/test/runTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'path';
1+
import * as path from 'upath';
22

33
import { runTests } from '@vscode/test-electron';
44

src/test/suite/command.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as vscode from 'vscode';
44
import { assert, expect } from 'chai';
55
import { EXTENSION_ID, LANGUAGE_ID, NOTEBOOK_TYPE, getContext } from '../../utils';
6-
const path = require('path');
6+
const path = require('upath');
77
// import * as myExtension from '../../extension';
88

99
const getTestFileUri = (relativePath: string) => {

src/test/suite/e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as vscode from 'vscode';
44
import { expect } from 'chai';
55
import { LANGUAGE_ID, NOTEBOOK_TYPE } from '../../utils';
6-
const path = require('path');
6+
const path = require('upath');
77
// import * as myExtension from '../../extension';
88

99
const getTestFileUri = (relativePath: string) => {

src/test/suite/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'path';
1+
import * as path from 'upath';
22
import * as Mocha from 'mocha';
33
import * as glob from 'glob';
44

src/test/suite/path-type.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import * as vscode from 'vscode';
44
import { LANGUAGE_ID, NOTEBOOK_TYPE, getContextUriFromCell, getPreferredPathFormatFromUri } from '../../utils';
55
import { expect } from 'chai';
6-
const path = require('path');
6+
const path = require('upath');
77
// import * as myExtension from '../../extension';
88

99
const getTestFileUri = (relativePath: string) => {

src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { rejects } from 'assert';
2-
import path = require('path');
31
import * as vscode from 'vscode';
2+
const path = require('upath');
43

54
export const NOTEBOOK_TYPE = 'jsonpath-notebook';
65
export const LANGUAGE_ID = 'JSONPath';

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,6 +1918,11 @@ underscore@^1.12.1:
19181918
resolved "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz"
19191919
integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==
19201920

1921+
upath@^2.0.1:
1922+
version "2.0.1"
1923+
resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b"
1924+
integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==
1925+
19211926
uri-js@^4.2.2:
19221927
version "4.4.1"
19231928
resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz"

0 commit comments

Comments
 (0)