Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

fixed import, changed class name #421

Merged
merged 2 commits into from
Oct 10, 2017
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/views/app/components/BoardSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import * as React from "react";
import { Col, DropdownButton, Grid, Row } from "react-bootstrap";
import * as Select from "react-select";
Copy link
Contributor

@yaohaizh yaohaizh Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this change. On the other hand, we need find out the root cause of this regression.

Could you help check the installed version of react-select on your local environment? It should be on the file of \src\views\node_modules\react-select\package.json file.

I think this might relate to the version change of react-select. If this is the case, we need fix down the react-select version for time being in the src\views\package.json ==> "react-select": "1.0.0-rc.10",

Copy link
Author

@brndmg brndmg Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the \src\views\node_modules\react-select\package.json, I see the following.

"_resolved": "https://registry.npmjs.org/react-select/-/react-select-1.0.0-rc.10.tgz",
  "_shasum": "f137346250f9255c979fbfa21860899928772350",
  "_shrinkwrap": null,
  "_spec": "react-select@^1.0.0-rc.4",

In the \src\views\node_modules\react-select\src\index.js, I see this:

export default Select;
export {
	Async,
	AsyncCreatable,
	Creatable,
	Value
};

Which aligns to the 1.0.0-rc.10 version on GitHub. https://github.com/JedWatson/react-select/blob/v1.0.0-rc.10/src/index.js#L12

in contrast to the older version upon which the extension has a dependency 1.0.0-rc.4 https://github.com/JedWatson/react-select/tree/v1.0.0-rc.4/src/ which doesn't have an explicit export of Select.

I will modify the \src\views\package.json in my PR to reflect the explicit dependency on the correct version of react-select?

Also, is there a way to add gui tests so that this issue could be found by the test suite?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root cause of this issue it that: though we have a package-lock.json file, we use the Node 6 (npm 3) in Travis CI, which does not respect the package-lock.json file.
To avoid similar issue happen again, we still need to keep the package-lock.json file, and update https://github.com/Microsoft/vscode-arduino/blob/master/.travis.yml#L4 to use node (latest stable Node.js release) instead of 6

import Select from "react-select";
import * as API from "../actions/api";

interface IBoardSelectorProps extends React.Props<any> {
Expand All @@ -14,7 +14,7 @@ interface IBoardSelectorProps extends React.Props<any> {
interface IBoardSelectorState extends React.Props<any> {
selectedBoard: any;
}
export default class BoardConfigItemView extends React.Component<IBoardSelectorProps, IBoardSelectorState> {
export default class BoardSelector extends React.Component<IBoardSelectorProps, IBoardSelectorState> {
constructor(props) {
super(props);
this.state = {
Expand Down