Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into turbo/data-aggregator
Browse files Browse the repository at this point in the history
# Conflicts:
#	pnpm-lock.yaml
  • Loading branch information
scottrippey committed Nov 16, 2023
2 parents 8f7a2d7 + c9991c7 commit b9f4fe4
Show file tree
Hide file tree
Showing 130 changed files with 2,704 additions and 1,471 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "FormidableLabs/victory" }],
"changelog": ["../scripts/changelog.js", { "repo": "FormidableLabs/victory" }],
"access": "public",
"baseBranch": "main",
"fixed": [["victory*"]]
Expand Down
6 changes: 6 additions & 0 deletions .changeset/orange-timers-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"victory-bar": minor
"victory-core": minor
---

added ref forwarding for path and bar components
26 changes: 26 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Setup
description: Setup Build Step
inputs:
node-version:
required: true
default: '18.x'

runs:
using: "composite"
steps:
- uses: pnpm/action-setup@v2
with:
version: 7

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: 'pnpm'

# Wireit cache
- uses: google/wireit@setup-github-actions-caching/v1

- name: Install dependencies
shell: bash
run: pnpm install
36 changes: 6 additions & 30 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,25 @@ on:
branches:
- main
paths:
- "stories/**"
- 'stories/**'
- 'packages/**'

jobs:
chromatic:
name: Storybook Publish
if: github.event.pull_request.draft == false && github.repository == 'FormidableLabs/victory'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# requires all branches and tags to be fetched for chromatic
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v1
# requires node16, see https://github.com/FormidableLabs/victory/issues/2668
- uses: ./.github/actions/setup
with:
# TODO: Upgrade Node version.
# Node18 currently hits `Error: error:0308010C:digital envelope routines::unsupported`
# https://github.com/storybookjs/storybook/issues/16555
# When we upgrade to webpack5 this should go away.
node-version: 16.x

# Wireit cache
- uses: google/wireit@setup-github-actions-caching/v1

- uses: pnpm/[email protected]
with:
version: 7

- name: Get pnpm store directory
id: pnpm-cache
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build Storybook
run: pnpm run storybook:build

Expand Down
30 changes: 3 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,13 @@ jobs:
DISPLAY: :99.0
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}

# Wireit cache
- uses: google/wireit@setup-github-actions-caching/v1

- uses: pnpm/[email protected]
with:
version: 7

- name: Get pnpm store directory
id: pnpm-cache
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Check all package.json's and tsconfig.json's are in sync.
run: |
pnpm sync
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/docs.yml

This file was deleted.

52 changes: 23 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,21 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
issues: write
repository-projects: write
deployments: write
packages: write
pull-requests: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CHANGESETS_GITHUB_TOKEN }}

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x

# Wireit cache
- uses: google/wireit@setup-github-actions-caching/v1

- uses: pnpm/[email protected]
with:
version: 7

- name: Get pnpm store directory
id: pnpm-cache
run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"

- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- uses: ./.github/actions/setup

- name: Build packages
run: pnpm run build
Expand All @@ -54,5 +37,16 @@ jobs:
version: pnpm run version
publish: pnpm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Note: we are using a different GITHUB_TOKEN due to the issues in this thread:
# https://github.com/changesets/action/issues/187
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# Note: We run a custom release notes script so we can generate a single aggregate
# release notes file for all packages. This can be removed when `changesets` supports
# this feature natively.
- name: Github Release notes
if: steps.changesets.outputs.published == 'true'
run: npm run release-notes
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GITHUB_TOKEN }}
13 changes: 7 additions & 6 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ const STORIES = path.resolve(ROOT, "stories");
module.exports = {
webpackFinal: async (config) => {
// Read all the victory packages and alias.
glob.sync(path.join(PKGS, "victory*/package.json"))
.forEach((pkgPath) => {
const key = path.dirname(path.relative(PKGS, pkgPath));
config.resolve.alias[key] = path.resolve(path.dirname(pkgPath));
});
glob.sync(path.join(PKGS, "victory*/package.json").replace(/\\/g, "/")).forEach((pkgPath) => {
const key = path.dirname(path.relative(PKGS, pkgPath));
config.resolve.alias[key] = path.resolve(path.dirname(pkgPath));
});

return config;
},
Expand All @@ -32,5 +31,7 @@ module.exports = {
},
],
// Use glob to locate the stories, because it ignores our circular dependencies.
stories: glob.sync("../**/*.stories.@(js|jsx|ts|tsx)", { cwd: __dirname }),
stories: glob.sync("../**/*.stories.@(js|jsx|ts|tsx)", {
cwd: __dirname,
}),
};
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Note that Chromatic internally runs `npm run build-storybook` around which we ha

We use [changesets](https://github.com/changesets/changesets) to create package versions and publish them.

### Using changsets
### Using changesets

Our official release path is to use automation to perform the actual publishing of our packages. The steps are to:

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<div align="center">
<img width="300" alt="victory" src="https://raw.githubusercontent.com/FormidableLabs/formidable-oss-badges/master/src/assets/featuredLogos/victory.svg?sanitize=true" />

<br />
<br />
<a href="https://formidable.com/open-source/" target="_blank">
<img alt="Victory — Formidable, We build the modern web" src="https://raw.githubusercontent.com/FormidableLabs/victory/main//Victory-Hero.png" />
</a>

<strong>
an ecosystem of composable React components for building interactive data visualizations.
Expand Down Expand Up @@ -83,7 +82,7 @@ Projects using Victory should also depend on [React][]. Victory works with React

## Victory Native

Victory Native shares most of its code with Victory, and has a nearly identical API! To learn more, check out the [Victory Native package REAMDE](./packages/victory-native/README.md).
Victory Native shares most of its code with Victory, and has a nearly identical API! To learn more, check out the [Victory Native package README](./packages/victory-native/README.md).

## Contributing
Please see the [Contributing guide](CONTRIBUTING.md).
Expand Down
Binary file added Victory-Hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion config/webpack/demo/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");

const ROOT = path.resolve(__dirname, "../../.."); // eslint-disable-line no-undef
const PKGS = path.join(ROOT, "packages")
const VICTORY_GLOB = path.join(PKGS, "victory*/package.json").replace(/\\/g, "/");
// Read all the victory packages and alias.
const VICTORY_ALIASES = glob.sync(path.join(PKGS, "victory*/package.json"))
const VICTORY_ALIASES = glob.sync(VICTORY_GLOB)
.reduce((memo, pkgPath) => {
const key = path.dirname(path.relative(PKGS, pkgPath));
memo[key] = path.resolve(path.dirname(pkgPath));
Expand Down
8 changes: 8 additions & 0 deletions demo/ts/components/victory-axis-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ export default class VictoryAxisDemo extends React.Component<
"Mariners\nSEA",
]}
/>

<VictoryAxis
label="Empty Values"
padding={{ top: 40, bottom: 40, left: 40, right: 90 }}
orientation="right"
style={styleOverrides}
tickValues={[]}
/>
</div>
</div>
);
Expand Down
8 changes: 0 additions & 8 deletions docs/formideploy.config.js

This file was deleted.

6 changes: 1 addition & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"btoa": "^1.2.1",
"chalk": "^4.1.0",
"cross-env": "^6.0.3",
"formideploy": "^0.4.0",
"github-slugger": "^1.2.1",
"gray-matter": "^3.1.1",
"js-yaml": "^3.12.0",
Expand All @@ -83,9 +82,6 @@
"scripts": {
"start": "node --max-old-space-size=2048 node_modules/react-static/bin/react-static start",
"build": "node ./scripts/build.js",
"clean": "rimraf dist",
"serve": "formideploy serve --port 4000",
"deploy:stage": "formideploy deploy --staging",
"deploy:prod": "formideploy deploy --production"
"clean": "rimraf dist"
}
}
Loading

0 comments on commit b9f4fe4

Please sign in to comment.