Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
acharyakavita committed Jan 23, 2024
2 parents 7f9d4cc + 1856276 commit 02cbcc1
Show file tree
Hide file tree
Showing 254 changed files with 3,427 additions and 5,245 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-bananas-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-create-container": patch
---

Migrate victory-create-container to TypeScript
17 changes: 0 additions & 17 deletions .changeset/eleven-waves-attend.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/long-files-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-voronoi": patch
---

Migrate victory-voronoi to TypeScript
5 changes: 5 additions & 0 deletions .changeset/olive-bananas-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-voronoi-container": patch
---

Migrate victory-voronoi-container to TypeScript
20 changes: 20 additions & 0 deletions .changeset/silver-feet-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"victory-axis": patch
"victory-bar": patch
"victory-box-plot": patch
"victory-brush-container": patch
"victory-brush-line": patch
"victory-candlestick": patch
"victory-chart": patch
"victory-core": patch
"victory-create-container": patch
"victory-errorbar": patch
"victory-legend": patch
"victory-polar-axis": patch
"victory-selection-container": patch
"victory-shared-events": patch
"victory-stack": patch
"victory-voronoi-container": patch
---

Refactor param reassignments
5 changes: 5 additions & 0 deletions .changeset/silver-weeks-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-zoom-container": patch
---

Migrate victory-zoom-container to TypeScript
5 changes: 5 additions & 0 deletions .changeset/six-donuts-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-histogram": patch
---

Migrate victory-histogram to TypeScript
6 changes: 6 additions & 0 deletions .changeset/tender-bees-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"victory-core": patch
"victory-tooltip": patch
---

Migrate victory-tooltip to typescript
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = {
"error",
{ ignore: [-1, 0, 0.5, 1, 2, 90, 180, 270, 360] },
],
"no-param-reassign": "error",
},
parser: "@babel/eslint-parser",
parserOptions: {
Expand Down
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/victory-turbo-component-re-write.md

This file was deleted.

60 changes: 54 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ on:
- main

jobs:
test:
name: Check Code
build:
runs-on: ubuntu-latest
env:
DISPLAY: :99.0
strategy:
matrix:
node-version: [16.x, 18.x]
Expand All @@ -34,5 +31,56 @@ jobs:
- name: Build libraries and distributions ${{ matrix.node-version }}
run: pnpm build

- name: Check Code ${{ matrix.node-version }}
run: pnpm check:ci
format:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: 18.x

- name: Format
run: pnpm format

lint:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: 18.x

- name: Lint
run: pnpm lint

types:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- name: Types Check ${{ matrix.node-version }}
run: pnpm types:check

test:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

- name: Test ${{ matrix.node-version }}
run: pnpm jest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ Please see the [Contributing guide](CONTRIBUTING.md).

## Maintenance Status

**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.
**Active:** Formidable is actively working on this project, and we expect to continue to work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.

[react]: https://facebook.github.io/react/
8 changes: 4 additions & 4 deletions demo/js/components/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class App extends React.Component {
}

handleSelection(datasets) {
const points = datasets.reduce((memo, dataset) => {
memo = memo.concat(dataset.data);
return memo;
}, []);
const points = datasets.reduce(
(memo, dataset) => memo.concat(dataset.data),
[],
);
this.setState({ points });
}

Expand Down
8 changes: 4 additions & 4 deletions demo/js/components/selection-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class App extends React.Component {
}

handleSelection(datasets) {
const points = datasets.reduce((memo, dataset) => {
memo = memo.concat(dataset.data);
return memo;
}, []);
const points = datasets.reduce(
(memo, dataset) => memo.concat(dataset.data),
[],
);
this.setState({ points });
}

Expand Down
8 changes: 4 additions & 4 deletions demo/ts/components/selection-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export default class SelectionDemo extends React.Component<
}

handleSelection(datasets: DataSet[]) {
const points = datasets.reduce((memo: any, dataset: DataSet) => {
memo = memo.concat(dataset.data);
return memo;
}, []);
const points = datasets.reduce(
(memo: any, dataset: DataSet) => memo.concat(dataset.data),
[],
);
this.setState({ points });
}

Expand Down
58 changes: 5 additions & 53 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">Victory Documentation Site</h1>

[Documentation site](https://formidable.com/open-source/victory/) for [victory](https://github.com/FormidableLabs/victory) built with [react-static](https://github.com/nozzle/react-static), and deployed with [formideploy](https://github.com/FormidableLabs/formideploy)
[Documentation site](https://formidable.com/open-source/victory/) for [victory](https://github.com/FormidableLabs/victory) built with [react-static](https://github.com/nozzle/react-static).


## Getting Started
Expand All @@ -25,62 +25,14 @@ Once it builds successfully, serve it:
```bash
yarn serve
```
The staging and production sites are served from a nested path, e.g. `https://formidable.com/open-source/victory`. This step is important for validating that both the `basePath` used by the static HTML output and the `basename` used by the client-side router are working as expected.
The staging and production sites are served from a nested path, e.g. `https://commerce.nearform.com/open-source/victory`. This step is important for validating that both the `basePath` used by the static HTML output and the `basename` used by the client-side router are working as expected.

## Deployment

### Staging

_Only for project administrators._

Our CI deploys to staging for each PR using surge.sh at the following URL:

`https://formidable-com-victory-staging-${PR_NUMBER}.surge.sh/open-source/victory`

To test things out locally find the `Surge.sh` entry in 1password in the IC vault and make up some pretend values for a PR number in `FORMIDEPLOY_PULL_REQUEST`:

```sh
$ cd docs
$ yarn clean && \
yarn build
$ SURGE_LOGIN=<SNIPPED> \
SURGE_TOKEN=<SNIPPED> \
FORMIDEPLOY_PULL_REQUEST=12 \
yarn deploy:stage
```

### Production

_Only for project administrators._

Our CI is configured to deploy the production build in `dist` to `formidable.com/open-source/victory`. This will happen automatically when a branch with docs changes that was opened by an internal collaborator is merged into the `main` branch of this repo. This section discusses kicking the tires locally:

First, install the AWS CLI:

```sh
$ brew install awscli
```

Then, set up `aws-vault` with the AWS access and secret keys for "CI" in the `AWS IAM (victory-ci)` entry in the IC vault:

```sh
$ brew cask install aws-vault
$ aws-vault add fmd-victory-ci
# Enter AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY values.
```

_note_ if these keys do not already exist in the IC vault, they will need to be created. Please reach out to a member of the cloud team for help.

Then build for production and deploy with dry run to check things:

```sh
$ cd docs
$ yarn clean && \
yarn build
$ aws-vault exec fmd-victory-ci --no-session -- \
yarn deploy:prod --dryrun
```
This site is deployed with Vercel infrastructure and is automated with a repository trigger in the Formidable Labs Vercel account.

### Notes
The site is directly accessible at [https://victory-rose.vercel.app/open-source/victory](https://victory-rose.vercel.app/open-source/victory).

Docs PRs that originate from forks will not trigger staging or production builds of the docs site. To trigger a docs update based on a forked PR, someone with write access to the repo should open a new PR based on the changes and close the original with a reference. [Here's a handy git alias for creating a new branch based on a pr](https://gist.github.com/gvaughn/f3c7897a51e52138eac1)
The `commerce.nearform.com` site uses a rewrite to host it under the path [https://commerce.nearform.com/open-source/victory/](https://commerce.nearform.com/open-source/victory/).
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"styled-components": "^5.1.0",
"styled-normalize": "^8.0.6",
"unist-util-visit": "^1.4.0",
"victory": "^36.4.0"
"victory": "^36.8.2"
},
"devDependencies": {
"babel-cli": "^6.26.0",
Expand Down
Loading

0 comments on commit 02cbcc1

Please sign in to comment.