Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare for v5.0.2 #944

Merged
merged 4 commits into from
Nov 12, 2022
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
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ You can see the full [features](#features) and learn more details in the [How-To

Happy testing!

## Release Notes
## Releases
- **stable**: [v4.6.0](release-notes/release-note-v4.md#v460)
- **pre-release**: [v5.0.1](release-notes/release-note-v5.md#v50-pre-release-roll-up)
- **pre-release**: [v5.0.2](release-notes/release-note-v5.md#v50-pre-release-roll-up)

All: [Release Notes](release-notes/release-notes.md)

Expand All @@ -36,7 +36,7 @@ All: [Release Notes](release-notes/release-notes.md)
Content
- [vscode-jest](#vscode-jest)
- [Getting Started](#getting-started)
- [Release Notes](#release-notes)
- [Releases](#releases)
- [Features](#features)
- [Installation](#installation)
- [How To?](#how-to)
Expand Down Expand Up @@ -67,7 +67,7 @@ Content
- [Troubleshooting](#troubleshooting)
- [Jest failed to run](#jest-failed-to-run)
- [Performance issue?](#performance-issue)
- [Intermittent errors for (npm/yar/node) command not found during test run or debugging](#intermittent-errors-for-npmyarnode-command-not-found-during-test-run-or-debugging)
- [Intermittent errors for (npm/yarn/node) command not found during test run or debugging](#intermittent-errors-for-npmyarnnode-command-not-found-during-test-run-or-debugging)
- [I don't see "Jest" in the bottom status bar](#i-dont-see-jest-in-the-bottom-status-bar)
- [What to do with "Long Running Tests Warning"](#what-to-do-with-long-running-tests-warning)
- [The tests and status do not match or some tests showing question marks unexpectedly?](#the-tests-and-status-do-not-match-or-some-tests-showing-question-marks-unexpectedly)
Expand Down Expand Up @@ -432,7 +432,7 @@ By default, jest command is executed in default shell ('cmd' for windows, '/bin/

Note the LoginShell is only applicable for non-windows platform and could cause a bit more overhead.

<a id="auto-fallback-login-shell"></a>
<a id="auto-recovery-login-shell"></a>
_Note_: If detected shell env issue, such as `node: command not found` or `npm: no such file or directory`, the extension will fallback to a login shell to ensure tests can run correctly. If will try to auto generate a login shell configuration based on the `jest.shell` setting, otherwise, it will use the default `bash` login-shell. Currently supported auto-fallback shells are `bash`, `zsh`, `fish`.
### Debug Config

Expand Down Expand Up @@ -592,12 +592,12 @@ Every project and developer are different. Experiment and pick the autoRun setti

</details>

### Intermittent errors for (npm/yar/node) command not found during test run or debugging
### Intermittent errors for (npm/yarn/node) command not found during test run or debugging

This should only happen in Linux or MacOS, and is due to vscode not able to fully initialize the shell env when it starts up (more details [here](https://code.visualstudio.com/docs/supporting/faq#_resolving-shell-environment-fails)).

- for test run:
A solution is introduced in [v5.0.2](release-notes/release-note-v5.md#v50-pre-release-roll-up), which will [automatically fallback to a login-shell](#auto-fallback-login-shell) during such situation. Hopefully, this should not be an issue any more 🤞.
A solution is introduced in [v5.0.2](release-notes/release-note-v5.md#v50-pre-release-roll-up), which will [automatically recover with a login-shell](#auto-recovery-login-shell) during such situation. Hopefully, this should not be an issue any more 🤞.
- for test debugging:
- you can instruct vscode debugger to use a login shell via [task/debug profile](https://code.visualstudio.com/docs/terminal/profiles#_configuring-the-taskdebug-profile), for example, adding the following in your user's settings then restart:

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-jest",
"displayName": "Jest",
"description": "Use Facebook's Jest With Pleasure.",
"version": "5.0.1",
"version": "5.0.2",
"publisher": "Orta",
"engines": {
"vscode": "^1.68.1"
Expand Down
29 changes: 19 additions & 10 deletions release-notes/release-note-v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
- [2. automate monorepo project setup through "Setup Tool"](#2-automate-monorepo-project-setup-through-setup-tool)
- [3. improve test run output with terminal](#3-improve-test-run-output-with-terminal)
- [4. deep activation](#4-deep-activation)
- [5. login shell support](#5-login-shell-support)
- [5. no more intermittent "command not found" (auto recovery with login-shell)](#5-no-more-intermittent-command-not-found-auto-recovery-with-login-shell)
- [6. long run monitor](#6-long-run-monitor)
- [7. one-click disable non-jest folder for monorepo project](#7-one-click-disable-non-jest-folder-for-monorepo-project)
- [8. autoRun change](#8-autorun-change)
- [9. supports v8 coverage provider](#9-supports-v8-coverage-provider)
- [Fixes](#fixes)
- [Breaking Changes](#breaking-changes)
- [Change log](#change-log)

---
## v5.0 (pre-release) (roll-up)

v5 mainly focuses on addressing performance and ease of use. The goal is to help new and experienced users fully utilize the extension features to make testing a fun experience.
v5 mainly focuses on addressing performance, stablity and ease of use. The goal is to help new and experienced users fully utilize the extension features to make testing a fun experience.

We have also decided to make TestExplorer a preferred UI outlet instead of our custom UI developed before TestExplorer. For example, we no longer support the inline decorator for test status as TestExplorer provided a much more powerful gutter status/menu.
### Main Features
Expand Down Expand Up @@ -60,18 +61,17 @@ For projects do not meet any of the existing activation events, there is now a n

([v5.0.0](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.0): [#907](https://github.com/jest-community/vscode-jest/pull/907) - @connectdotz)

#### 5. login shell support
#### 5. no more intermittent "command not found" (auto recovery with login-shell)

vscode process env doesn't always fully initialized, especially during restart. This usually manifest into command not found errors (exit code 127), such as `"env: node: No such file or directory"` or `"env: yarn: No such file or directory"` when running jest process.
On non-windows platforms, vscode sometimes fails to initialize its process env upon starting up, which crashes jest run/debug with "command not found" errors (exit code 127), such as `"env: node: No such file or directory"` or `"/bin/sh: yarn: command not found"`. This has caused a lot confusion and frustration, therefore, we added the functionality to automatically retry tests with a login shell (instead of the default non-login shell) when detecting the above-mentioned errors.

While there are many work arounds, we want to add one more option for users prefer launching jest in a login shell, which will initialize the shell env independent of vscode process env. This is accomplished by expanding the current ["jest.shell"](../README.md#shell) setting, for example:
```json
"jest.shell": {"path": "/bin/bash", "args": ["--login"]}
```
The extension can auto generate login shell for `bash`, `zsh`, and `fish`. Users can also configure custom login shells by expanding the current ["jest.shell"](../README.md#shell) setting, such as: `"jest.shell": {"path:": "/bin/bash", "args": ["-l"]}`. This will instruct the extension to always use the login shell.

Please note these changes only apply to test runs; you might experience similar issues when debugging tests, as we do not control how the vscode debugger is launched. But fortunately, a similar solution (login shell) will work for debugging as well - by customizing `"terminal.integrated.automationProfile.<platform>"`; see instruction in [intermitten error troubleshooting](../README.md##intermittent-errors-for-npmyarnnode-command-not-found-during-test-run-or-debugging)

Note, the extra initialization might have some performance overhead, use this with caution.

([v5.0.0](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.0): [#874](https://github.com/jest-community/vscode-jest/pull/874) - @connectdotz)
([v5.0.2](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.2): [#941](https://github.com/jest-community/vscode-jest/pull/941) - @connectdotz)

#### 6. long run monitor

Expand Down Expand Up @@ -101,11 +101,19 @@ If you already have the `"jest.autoRun"` in your settings.json file, nothing wil

([v5.0.0](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.0): [#906](https://github.com/jest-community/vscode-jest/pull/906) - @connectdotz)

#### 9. supports v8 coverage provider

Users with jest coverageProvider `v8` should be able to see coverage like with the default `babel` coverageProvider. Please be mindful that these providers do generate slightly different coverage reports, see [facebook/jest#11188](https://github.com/facebook/jest/issues/11188) for more details.

([v5.0.2](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.0): [#943](https://github.com/jest-community/vscode-jest/pull/943) - @connectdotz)
### Fixes
- add user id/name to output file name to resolve permission conflict in shared computers. ([#938](https://github.com/jest-community/vscode-jest/pull/938))
- support look up debug config from workspace file `.code-workspace`. ([#937](https://github.com/jest-community/vscode-jest/pull/937))
- address issues that vscode runs occasionally appears to be hanging when the runs already completed. ([#926](https://github.com/jest-community/vscode-jest/pull/926), [#927](https://github.com/jest-community/vscode-jest/pull/927), [#932](https://github.com/jest-community/vscode-jest/pull/932))
- missing runtime error detection and reporting when the run fails to start. ([#927](https://github.com/jest-community/vscode-jest/pull/927))
- Fix quoting test names with special characters ([#928](https://github.com/jest-community/vscode-jest/pull/928))
- fixed incorrect TestExplorer tests passed count ([#916](https://github.com/jest-community/vscode-jest/pull/916) - @connectdotz)
- fixed incorrect TestExplorer tests passed count ([#916](https://github.com/jest-community/vscode-jest/pull/916))
- fix various dependency alerts
- various document updates

### Breaking Changes
Expand All @@ -115,6 +123,7 @@ If you already have the `"jest.autoRun"` in your settings.json file, nothing wil
- removed the "enable" and "showClassicStatus" attributes. The only valid attribute is "showInlineError".
- `"jest.autoRun` default value has changed. see detail above.
### Change log
- [v5.0.2 pre-release](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.2)
- [v5.0.1 pre-release](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.1)
- [v5.0.0 pre-release](https://github.com/jest-community/vscode-jest/releases/tag/v5.0.0)

1 change: 1 addition & 0 deletions src/extensionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ export class ExtensionManager {

const ReleaseNoteBase = 'https://github.com/jest-community/vscode-jest/blob/master/release-notes';
const ReleaseNotes: Record<string, string> = {
'5.0.2': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
'5.0.1': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
'5.0.0': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
};