Skip to content

Commit

Permalink
v4.0 (#183)
Browse files Browse the repository at this point in the history
* Added support for advanced semver strings

* Update CHANGELOG/release-notes (#181)

Looks good to me, thanks!

* Updated vulnerable versions of react-scripts, standard, and webpack-dev-server. Ran standardjs linter to cleanup code. (#182)

* Added support for advanced semver strings

* Fixed remaining linter issues

* Bumped electron builder to be compatible with Catalina

* v3.1.4

* Updated to electron 7, fixed issues related to upgrade. Cleaned up App.js code

* Fixing issues related to electron update

* Electron 7 doesn't seem to refocus the app when clicking on the taskbar icon, change to destroy the previous window and reload.

* Updated spectron and fixed issues with testing

* Added accessibility audit to spectron unit tests. Fixed accessibility issue (low contrast)

* Added footer test, removed unused App test

* 4.0.0

* changelog for v4.0

* Added support for advanced semver strings

* Fixed remaining linter issues

* Bumped electron builder to be compatible with Catalina

* v3.1.4

* Updated to electron 7, fixed issues related to upgrade. Cleaned up App.js code

* Fixing issues related to electron update

* Electron 7 doesn't seem to refocus the app when clicking on the taskbar icon, change to destroy the previous window and reload.

* Updated spectron and fixed issues with testing

* Added accessibility audit to spectron unit tests. Fixed accessibility issue (low contrast)

* Added footer test, removed unused App test

* 4.0.0

* changelog for v4.0

* - Removed assets from yarnclean (was breaking coverage reports)
- moved app load code from `UNSAFE_componentWillMount` to 
`componentDidMount`
- return `mainWindow` after restoring from minimized state
  • Loading branch information
rmcvey authored and nathancharles committed Dec 2, 2019
1 parent a586324 commit e1f4981
Show file tree
Hide file tree
Showing 20 changed files with 704 additions and 468 deletions.
2 changes: 1 addition & 1 deletion .yarnclean
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docs
doc
website
images
assets
# assets

# examples
example
Expand Down
24 changes: 19 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,32 @@

All notable changes to this project will be documented in this file.

## [4.0.0](https://github.com/Netflix-Skunkworks/stethoscope-app/tree/v3.1.4)

### Added
- Advanced semver support (e.g. ">10.15 <=10.14.6 || 10.15.1"), allows policies to support multiple major versions
- Dark mode support
- Accessibility audit unit test

### Fixed
- Build issues with Catalina - updated electron-builder dependency
- Updated vulnerable dependencies (react-scripts, webpack-server)
- Code formatting issues
- Loader contrast issues (a11y)

### Changed
- Moved to electron@7 and spectron@9

----

## [3.1.3](https://github.com/Netflix-Skunkworks/stethoscope-app/tree/v3.1.3)

### Fixed
- Auto update settings were defaulting to fail when they should have been defaulting to pass. Auto update is on by default, and until the preferences are changed, the settings don't exist.
- Minor regression: DeviceID resolution for Windows and Linux
- Build fixes for MacOS Catalina

Added:
- Thrift connection pooling
- Support for AWS workstations
- Added Scan duration to UI
- Automated testing for builds
### Added:
- Cross-platform support for applications schema

----
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Stethoscope",
"version": "3.1.3",
"version": "4.0.0",
"private": true,
"homepage": "./",
"author": "Netflix",
Expand Down Expand Up @@ -99,8 +99,8 @@
"benchmark": "^2.1.4",
"chai": "^4.1.2",
"chai-http": "^4.0.0",
"electron": "^5.0.1",
"electron-builder": "20.40.2",
"electron": "^7.1.0",
"electron-builder": "21.2.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"eslint-plugin-standard": "^4.0.0",
Expand All @@ -113,7 +113,7 @@
"react-scripts": "^3.2.0",
"rimraf": "^2.6.3",
"shx": "^0.3.2",
"spectron": "^7.0.0",
"spectron": "^9.0.0",
"standard": "^14.3.1",
"tap": "^12.1.1",
"terser": "^3.14.1",
Expand Down
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="stylesheet" href="%PUBLIC_URL%/style/source-sans.css">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-eval' 'unsafe-inline' http://127.0.0.1:37370 ws://127.0.0.1:37370">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
27 changes: 15 additions & 12 deletions src/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDOMServer from 'react-dom/server'
import Accessible from './Accessible'
import ActionIcon, { VARIANTS, VARIANT_COLORS } from './ActionIcon'
import semver from './lib/patchedSemver'
import getRecommendedVersion from './lib/getRecommendedVersion'
import showdown from 'showdown'
import Handlebars from 'handlebars/dist/handlebars.min.js'

Expand All @@ -28,7 +29,7 @@ class Action extends Component {
}
}

toggleDescription = () => {
handleToggleDescription = () => {
if (!this.state.showDescription && this.props.status === 'FAIL') {
this.props.onExpandPolicyViolation()
}
Expand Down Expand Up @@ -81,15 +82,19 @@ class Action extends Component {
})

Handlebars.registerHelper('requirement', (key, platform) => {
const version = semver.coerce(policy[key][platform].ok)
// display the highest minimum version
// if advanced semver requirement is passed (e.g. >1.2.3 || < 3.0.0)
const { ok } = policy[key][platform]
const recommended = getRecommendedVersion(ok)

return new Handlebars.SafeString(
ReactDOMServer.renderToStaticMarkup(
<table style={{ width: 'auto' }}>
<tbody>
<tr>
<td>Suggested version:</td>
<td>
<span className='suggested-value'>{String(version)}</span>
<span className='suggested-value'>{String(recommended)}</span>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -147,14 +152,12 @@ class Action extends Component {
<div className='description'>
{action.description}
</div>
{ action.details &&
<pre className='description'>{action.details}</pre>
}
{ action.link &&
<a href={action.link} target='_blank' rel='noopener noreferrer'>More info</a>
}
{action.details &&
<pre className='description'>{action.details}</pre>}
{action.link &&
<a href={action.link} target='_blank' rel='noopener noreferrer'>More info</a>}
</div>
{ action.directions && (
{action.directions && (
<div
className='instructions'
dangerouslySetInnerHTML={{ __html: this.parseDirections() }}
Expand All @@ -171,15 +174,15 @@ class Action extends Component {
key={String(action.title).replace(/[^a-zA-Z]+/g, '')}
ref={el => { this.el = el }}
>
<span className='title' onClick={this.toggleDescription}>
<span className='title' onClick={this.handleToggleDescription}>
<ActionIcon
className='action-icon'
variant={this.getIconVariant(type)}
/>
{this.parseTitle()}
</span>
<Accessible label='Toggle action description' expanded={this.state.showDescription}>
<a href='#toggle' className={`toggleLink show-description ${this.state.showDescription ? 'open' : 'closed'}`} onClick={this.toggleDescription}>&#9660;</a>
<a href='#toggle' className={`toggleLink show-description ${this.state.showDescription ? 'open' : 'closed'}`} onClick={this.handleToggleDescription}>&#9660;</a>
</Accessible>
{description}
</li>
Expand Down
Loading

0 comments on commit e1f4981

Please sign in to comment.