-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix extension initialization on Windows (downgrade from esm only pack…
…ages) (#3937)
- Loading branch information
1 parent
260850a
commit 7f21fb6
Showing
15 changed files
with
85 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import process from 'process' | ||
import { executeProcess, processExists } from './execution' | ||
|
||
describe('executeProcess', () => { | ||
it('should be able to run a process', async () => { | ||
const output = await executeProcess({ | ||
args: ['some', 'text'], | ||
cwd: __dirname, | ||
executable: 'echo' | ||
}) | ||
expect(output).toMatch(/some.*text/) | ||
}) | ||
|
||
it('should return the stderr if the process throws with stderr', async () => { | ||
await expect( | ||
executeProcess({ | ||
args: ['me', 'outside'], | ||
cwd: __dirname, | ||
executable: 'find' | ||
}) | ||
).rejects.toBeTruthy() | ||
}) | ||
}) | ||
|
||
describe('processExists', () => { | ||
it('should return true if the process exists', async () => { | ||
expect(await processExists(process.pid)).toBe(true) | ||
}) | ||
it('should return false if it does not', async () => { | ||
expect(await processExists(-123.321)).toBe(false) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { join, resolve } from 'path' | ||
require('dvc/src/vscode/mockModule') | ||
|
||
const importModuleAfterMockingVsCode = () => { | ||
const { setupTestVenv } = require('dvc/src/python') | ||
|
||
return setupTestVenv | ||
} | ||
|
||
const setupTestVenv = importModuleAfterMockingVsCode() | ||
|
||
const cwd = resolve(__dirname, '..', 'demo') | ||
|
||
setupTestVenv(cwd, '.env', '-r', join('.', 'requirements.txt')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10667,22 +10667,7 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: | |
md5.js "^1.3.4" | ||
safe-buffer "^5.1.1" | ||
|
||
[email protected], execa@^7.1.1: | ||
version "7.1.1" | ||
resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" | ||
integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== | ||
dependencies: | ||
cross-spawn "^7.0.3" | ||
get-stream "^6.0.1" | ||
human-signals "^4.3.0" | ||
is-stream "^3.0.0" | ||
merge-stream "^2.0.0" | ||
npm-run-path "^5.1.0" | ||
onetime "^6.0.0" | ||
signal-exit "^3.0.7" | ||
strip-final-newline "^3.0.0" | ||
|
||
execa@^5.0.0, execa@^5.1.1: | ||
[email protected], execa@^5.0.0, execa@^5.1.1: | ||
version "5.1.1" | ||
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" | ||
integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== | ||
|
@@ -10712,6 +10697,21 @@ execa@^7.0.0: | |
signal-exit "^3.0.7" | ||
strip-final-newline "^3.0.0" | ||
|
||
execa@^7.1.1: | ||
version "7.1.1" | ||
resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" | ||
integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== | ||
dependencies: | ||
cross-spawn "^7.0.3" | ||
get-stream "^6.0.1" | ||
human-signals "^4.3.0" | ||
is-stream "^3.0.0" | ||
merge-stream "^2.0.0" | ||
npm-run-path "^5.1.0" | ||
onetime "^6.0.0" | ||
signal-exit "^3.0.7" | ||
strip-final-newline "^3.0.0" | ||
|
||
exenv-es6@^1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/exenv-es6/-/exenv-es6-1.1.1.tgz#80b7a8c5af24d53331f755bac07e84abb1f6de67" | ||
|
@@ -16550,12 +16550,12 @@ prismjs@^1.27.0, prismjs@~1.27.0: | |
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" | ||
integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== | ||
|
||
process-exists@5.0.0: | ||
version "5.0.0" | ||
resolved "https://registry.yarnpkg.com/process-exists/-/process-exists-5.0.0.tgz#0b6dcd3d19e85e1f72c633f56d38e498196e2855" | ||
integrity sha512-6QPRh5fyHD8MaXr4GYML8K/YY0Sq5dKHGIOrAKS3cYpHQdmygFCcijIu1dVoNKAZ0TWAMoeh8KDK9dF8auBkJA== | ||
process-exists@4.1.0: | ||
version "4.1.0" | ||
resolved "https://registry.yarnpkg.com/process-exists/-/process-exists-4.1.0.tgz#4132c516324c1da72d65896851cdbd8bbdf5b9d8" | ||
integrity sha512-BBJoiorUKoP2AuM5q/yKwIfT1YWRHsaxjW+Ayu9erLhqKOfnXzzVVML0XTYoQZuI1YvcWKmc1dh06DEy4+KzfA== | ||
dependencies: | ||
ps-list "^8.0.0" | ||
ps-list "^6.3.0" | ||
|
||
process-nextick-args@~2.0.0: | ||
version "2.0.1" | ||
|
@@ -16652,10 +16652,10 @@ prr@~1.0.1: | |
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" | ||
integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= | ||
|
||
ps-list@^8.0.0: | ||
version "8.1.1" | ||
resolved "https://registry.yarnpkg.com/ps-list/-/ps-list-8.1.1.tgz#9ff1952b26a9a07fcc05270407e60544237ae581" | ||
integrity sha512-OPS9kEJYVmiO48u/B9qneqhkMvgCxT+Tm28VCEJpheTpl8cJ0ffZRRNgS5mrQRTrX5yRTpaJ+hRDeefXYmmorQ== | ||
ps-list@^6.3.0: | ||
version "6.3.0" | ||
resolved "https://registry.yarnpkg.com/ps-list/-/ps-list-6.3.0.tgz#a2b775c2db7d547a28fbaa3a05e4c281771259be" | ||
integrity sha512-qau0czUSB0fzSlBOQt0bo+I2v6R+xiQdj78e1BR/Qjfl5OHWJ/urXi8+ilw1eHe+5hSeDI1wrwVTgDp2wst4oA== | ||
|
||
pseudomap@^1.0.2: | ||
version "1.0.2" | ||
|