Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
35ae6c6
feat: add swc task and TS declaration file emit task
TristanWatanabe Jan 20, 2023
64760b1
feat: update migrate-converged-pkg to add swcrc file
TristanWatanabe Jan 20, 2023
983b3ac
chore: update build just-task to account for swc transpilation for v9…
TristanWatanabe Jan 20, 2023
10ffe65
chore: add swcrc file and deps to v9 packages
TristanWatanabe Jan 20, 2023
61afebb
chore: update yarn.lock
TristanWatanabe Jan 20, 2023
48a82da
fix: add "@swc/cli": "0.1.59" dep
TristanWatanabe Jan 20, 2023
7fe4702
chore: update yarn.lock file
TristanWatanabe Jan 20, 2023
880d4d5
chore: add babel-plugin-module-resolver
TristanWatanabe Jan 20, 2023
3251eff
Test: add module-resolver plugin to babel.ts and compile CJS based of…
TristanWatanabe Jan 21, 2023
dc868e9
fix: use babel-plugin-module-resolver version that supports node < 16
TristanWatanabe Jan 21, 2023
bf8a75d
fix(global-context): restore node types
TristanWatanabe Jan 21, 2023
544fff8
fix: add swcrc files to v9 apps
TristanWatanabe Jan 21, 2023
3fc2995
Merge branch 'master' into swc-transpilation-take-2
TristanWatanabe Jan 21, 2023
5a0a83e
fix: add swcrc file to v8-v9 migration package
TristanWatanabe Jan 21, 2023
3635c42
New Approach: Transpile with TS first and then transpile those files …
TristanWatanabe Jan 21, 2023
dba0744
fix(vr-tests-v9): use rootMain storybook addons
TristanWatanabe Jan 21, 2023
0616364
fix: add react-storybook-addon back
TristanWatanabe Jan 21, 2023
f7290ae
fix(migrate-converged-pkg): use full browser support matrix as targets
TristanWatanabe Jan 21, 2023
4b14776
chore: update swcrc files of v9 packages to target full browser matrix
TristanWatanabe Jan 21, 2023
1e5bd4c
chore: use full browser matrix as targets for v9 apps
TristanWatanabe Jan 21, 2023
133db53
Merge branch 'master' into swc-transpilation-take-2
TristanWatanabe Jan 21, 2023
0605317
fix: export withFluentDecorator to fix VR test changes affecting CSF …
TristanWatanabe Jan 21, 2023
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
33 changes: 33 additions & 0 deletions apps/perf-test-react-components/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
33 changes: 33 additions & 0 deletions apps/recipes-react-components/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
33 changes: 33 additions & 0 deletions apps/ssr-tests-v9/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
33 changes: 33 additions & 0 deletions apps/ts-minbar-test-react-components/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
3 changes: 2 additions & 1 deletion apps/vr-tests-react-components/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const path = require('path');
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');
const rootMain = require('../../../.storybook/main');

module.exports = /** @type {import('../../../.storybook/main').StorybookBaseConfig} */ ({
addons: ['@fluentui/react-storybook-addon'],
addons: [...rootMain.addons, '@fluentui/react-storybook-addon'],

stories: ['../src/**/*.stories.tsx'],
core: {
Expand Down
3 changes: 3 additions & 0 deletions apps/vr-tests-react-components/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { setAddon } from '@storybook/react';
import { webLightTheme, teamsHighContrastTheme, webDarkTheme } from '@fluentui/react-theme';
import { FluentProvider } from '@fluentui/react-provider';
import { withFluentProvider } from '@fluentui/react-storybook-addon';

/**
* @deprecated https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-setaddon
Expand Down Expand Up @@ -67,3 +68,5 @@ setAddon({

/** @type {import("@fluentui/react-storybook-addon").FluentParameters} */
export const parameters = { layout: 'none', mode: 'vr-test' };

export const decorators = [withFluentProvider];
33 changes: 33 additions & 0 deletions apps/vr-tests-react-components/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"@storybook/manager-webpack5": "6.5.15",
"@storybook/react": "6.5.15",
"@storybook/theming": "6.5.15",
"@swc/cli": "0.1.59",
"@swc/core": "1.2.220",
"@swc/helpers": "0.4.11",
"@testing-library/dom": "8.11.3",
Expand Down Expand Up @@ -196,6 +197,7 @@
"babel-plugin-annotate-pure-imports": "1.0.0-1",
"babel-plugin-iife-wrap-react-components": "1.0.0-5",
"babel-plugin-lodash": "3.3.4",
"babel-plugin-module-resolver": "4.1.0",
"babel-plugin-tester": "10.1.0",
"beachball": "2.31.0",
"chalk": "4.1.0",
Expand Down Expand Up @@ -265,6 +267,7 @@
"json-schema": "0.4.0",
"json-stable-stringify-without-jsonify": "1.0.1",
"just-scripts": "1.8.2",
"just-scripts-utils": "1.1.5",
"lage": "1.8.8",
"lerna": "5.5.2",
"lerna-alias": "3.0.3-0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class DonutChartBase extends React.Component<IDonutChartProps, IDonutChar
// mapping data to the format Legends component needs
const legend: ILegend = {
title: point.legend!,
color: color,
color,
action: () => {
if (this.state.selectedLegend === point.legend) {
this.setState({ selectedLegend: '' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const points: IChartDataPoint[] = [
const chartTitle = 'Stacked Bar chart example';

const chartPoints: IChartProps = {
chartTitle: chartTitle,
chartTitle,
chartData: points,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export class HorizontalBarChartBase extends React.Component<IHorizontalBarChartP
this._calloutAnchorPoint = point;
this.setState({
isCalloutVisible: true,
hoverValue: hoverValue,
hoverValue,
lineColor: point.color!,
legend: point.legend!,
refSelected: currentHoveredElement!.refElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh

this._classNames = getClassNames(styles!, {
theme: this.props.theme!,
shouldHighlight: shouldHighlight,
href: href,
shouldHighlight,
href,
variant: this.props.variant,
hideLabels: this.props.hideLabels,
});
Expand Down Expand Up @@ -345,7 +345,7 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend!,
calloutLegend: point.legend!,
dataForHoverCard: pointData,
color: color,
color,
xCalloutValue: point.xAxisCalloutData!,
yCalloutValue: point.yAxisCalloutData!,
dataPointCalloutProps: point,
Expand All @@ -364,9 +364,9 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
this._classNames = getClassNames(styles!, {
legendColor: this.state.color,
theme: theme!,
width: width,
width,
className,
barHeight: barHeight,
barHeight,
});
};

Expand Down Expand Up @@ -394,7 +394,7 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
}
const legend: ILegend = {
title: point.legend!,
color: color,
color,
action: () => {
this._onClick(point.legend!);
},
Expand All @@ -420,7 +420,7 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
}
const legend: ILegend = {
title: point.legend!,
color: color,
color,
action: () => {
this._onClick(point.legend!);
},
Expand Down Expand Up @@ -481,7 +481,7 @@ export class MultiStackedBarChartBase extends React.Component<IMultiStackedBarCh
isCalloutVisible: this.state.selectedLegend === '' || this.state.selectedLegend === point.legend!,
calloutLegend: point.legend!,
dataForHoverCard: pointData,
color: color,
color,
xCalloutValue: point.xAxisCalloutData!,
yCalloutValue: point.yAxisCalloutData!,
dataPointCalloutProps: point,
Expand Down
33 changes: 33 additions & 0 deletions packages/react-components/babel-preset-global-context/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"@babel/traverse": "^7.12.13",
"@emotion/hash": "^0.8.0",
"find-up": "^5.0.0",
"tslib": "^2.1.0"
"tslib": "^2.1.0",
"@swc/core": "^1.3.24",
"@swc/helpers": "^0.4.11"
},
"peerDependencies": {
"@fluentui/global-context": "9.0.0-beta.13"
Expand Down
33 changes: 33 additions & 0 deletions packages/react-components/global-context/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"env": {
"targets": {
"chrome": "84",
"edge": "84",
"firefox": "75",
"opera": "73",
"safari": "14.1"
}
},
"exclude": [
"/testing",
"/**/*.cy.ts",
"/**/*.cy.tsx",
"/**/*.spec.ts",
"/**/*.spec.tsx",
"/**/*.test.ts",
"/**/*.test.tsx"
],
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": false,
"dynamicImport": false
},
"target": "es2019",
"externalHelpers": true
},
"minify": false,
"sourceMaps": true
}
4 changes: 3 additions & 1 deletion packages/react-components/global-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"dependencies": {
"@fluentui/react-context-selector": "^9.1.6",
"@fluentui/react-utilities": "^9.5.0",
"tslib": "^2.1.0"
"tslib": "^2.1.0",
"@swc/core": "^1.3.24",
"@swc/helpers": "^0.4.11"
},
"peerDependencies": {
"@types/react": ">=16.8.0 <19.0.0",
Expand Down
Loading