Skip to content

Commit

Permalink
chore(react-slider): properly apply nx migrate-converged-pkg to adher…
Browse files Browse the repository at this point in the history
…e to new dx setup (#19517)

* chore(react-slider): properly apply nx migrate-converged-pkg to adhere to new dx setup

* revert(react-button): remove vNext components used in SB  from devDeps that are stale

* Change files

* fixup! revert(react-button): remove vNext components used in SB  from devDeps that are stale

* fixup! fixup! revert(react-button): remove vNext components used in SB  from devDeps that are stale

* fixup! fixup! fixup! revert(react-button): remove vNext components used in SB  from devDeps that are stale
  • Loading branch information
Hotell authored Aug 30, 2021
1 parent 6e818d7 commit 77a8622
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "revert(react-button): remove vNext components used in SB from devDeps that are stale",
"packageName": "@fluentui/react-button",
"email": "[email protected]",
"dependentChangeType": "none"
}
1 change: 0 additions & 1 deletion packages/react-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"storybook": "start-storybook"
},
"devDependencies": {
"@fluentui/react-menu": "^9.0.0-alpha.68",
"@fluentui/a11y-testing": "^0.1.0",
"@fluentui/babel-make-styles": "^9.0.0-alpha.40",
"@fluentui/eslint-plugin": "^1.4.1",
Expand Down
7 changes: 5 additions & 2 deletions packages/react-button/src/MenuButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import * as React from 'react';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore
import { Menu, MenuItem, MenuList, MenuTrigger } from '@fluentui/react-menu';
// @ts-ignore
import type { MenuProps } from '@fluentui/react-menu';
/* eslint-enable @typescript-eslint/ban-ts-comment */

import { MenuButton } from './MenuButton';
import { Playground } from './Playground.stories';
import { buttonBaseProps } from './buttonBaseProps.stories';
import type { MenuProps } from '@fluentui/react-menu';
import type { MenuButtonProps } from './MenuButton';
import type { PlaygroundProps } from './Playground.types.stories';

Expand Down
3 changes: 3 additions & 0 deletions packages/react-slider/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["module:@fluentui/babel-make-styles", "annotate-pure-calls", "@babel/transform-react-pure-annotations"]
}
5 changes: 4 additions & 1 deletion packages/react-slider/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
const rootMain = require('../../../.storybook/main');

module.exports = /** @type {Pick<import('../../../.storybook/main').StorybookConfig,'addons'|'stories'|'webpackFinal'>} */ ({
module.exports = /** @type {Omit<import('../../../.storybook/main'), 'typescript'|'babel'>} */ ({
...rootMain,
stories: [...rootMain.stories, '../src/**/*.stories.mdx', '../src/**/*.stories.@(ts|tsx)'],
addons: [...rootMain.addons],
webpackFinal: (config, options) => {
const localConfig = { ...rootMain.webpackFinal(config, options) };

// add your own webpack tweaks if needed

return localConfig;
},
});
4 changes: 4 additions & 0 deletions packages/react-slider/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import * as rootPreview from '../../../.storybook/preview';

/** @type {typeof rootPreview.decorators} */
export const decorators = [...rootPreview.decorators];

/** @type {typeof rootPreview.parameters} */
export const parameters = { ...rootPreview.parameters };
12 changes: 7 additions & 5 deletions packages/react-slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
"code-style": "just-scripts code-style",
"just": "just-scripts",
"lint": "just-scripts lint",
"start": "just-scripts dev:storybook",
"start-test": "just-scripts jest-watch",
"test": "just-scripts test",
"update-snapshots": "just-scripts jest -u"
"start": "yarn storybook",
"test": "jest",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-slider/src && yarn docs",
"storybook": "start-storybook"
},
"devDependencies": {
"@fluentui/eslint-plugin": "^1.4.1",
Expand All @@ -37,7 +38,8 @@
"enzyme-adapter-react-16": "^1.15.0",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-test-renderer": "^16.3.0"
"react-test-renderer": "^16.3.0",
"@fluentui/babel-make-styles": "^9.0.0-alpha.40"
},
"dependencies": {
"@fluentui/react-make-styles": "^9.0.0-alpha.59",
Expand Down
7 changes: 3 additions & 4 deletions packages/react-slider/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES5",
"target": "ES2019",
"module": "CommonJS",
"lib": ["es5", "dom"],
"lib": ["ES2019", "dom"],
"outDir": "dist",
"jsx": "react",
"declaration": true,
"experimentalDecorators": true,
"importHelpers": true,
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["jest", "custom-global", "inline-style-expand-shorthand"],
"isolatedModules": true
"types": ["jest", "custom-global", "inline-style-expand-shorthand", "storybook__addons"]
}
}

0 comments on commit 77a8622

Please sign in to comment.