Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert Odyssey bundle exports #1920

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 13 additions & 5 deletions packages/odyssey-react-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"author": "Okta, Inc.",
"license": "Apache-2.0",
"sideEffects": false,
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/src/index.d.ts",
Expand All @@ -23,9 +22,18 @@
}
},
"exports": {
"./icons": "./dist/icons.generated/index.js",
"./labs": "./dist/labs/index.js",
".": "./dist/index.js",
"./icons": {
"types": "./dist/src/icons.generated/index.d.ts",
"default": "./dist/icons.generated/index.js"
},
"./labs": {
"types": "./dist/src/labs/index.d.ts",
"default": "./dist/labs/index.js"
},
".": {
"types": "./dist/src/index.d.ts",
"default": "./dist/index.js"
},
"./README.md": "./README.md"
},
"scripts": {
Expand All @@ -34,7 +42,7 @@
"build:cleanIconsIndex": "rimraf src/icons.generated/index.ts",
"build:source": "NODE_ENV=production BROWSERSLIST_ENV=modern babel src --out-dir dist --extensions .js,.jsx,.ts,.tsx --source-maps",
"build:types": "tsc --project tsconfig.production.json",
"build": "npm-run-all --sequential build:clean generate:i18n --parallel build:types build:source",
"build": "npm-run-all --sequential build:clean generate:i18n build:types build:source",
"dev:source": "yarn build:source --watch",
"dev:types": "yarn build:types --watch",
"dev": "npm-run-all --parallel dev:source dev:types",
Expand Down
14 changes: 7 additions & 7 deletions packages/odyssey-react-mui/scripts/properties-to-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
// Part of this has been copied over from @okta/ui-build-tools' own internal node script
// https://github.com/okta/ui-build-tools/blob/master/packages/clis/i18n/properties-to-json.js

import { resolve, join, basename, extname } from "node:path";
import {
const { resolve, join, basename, extname } = require("node:path");
const {
readFileSync,
writeFileSync,
rmSync,
existsSync,
mkdirSync,
} from "node:fs";
import properties from "properties";
import readdir from "recursive-readdir";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
} = require("node:fs");
const properties = require("properties");
const readdir = require("recursive-readdir");
const yargs = require("yargs");
const { hideBin } = require("yargs/helpers");

const convert = (baseFiles, propertiesTargetDir) => {
for (const src of baseFiles) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

import type { Meta, StoryObj } from "@storybook/react";

import { Box } from "@mui/material";
Copy link
Contributor

Choose a reason for hiding this comment

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

Do other components need updating too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but all I did here was move imports around.

import {
Button,
buttonSizeValues,
buttonTypeValues,
buttonVariantValues,
type ButtonProps,
} from "@okta/odyssey-react-mui";
import type { ButtonProps } from "@okta/odyssey-react-mui";
import { AddIcon } from "@okta/odyssey-react-mui/icons";
import { expect } from "@storybook/jest";
import { userEvent, waitFor, within } from "@storybook/testing-library";
import type { Meta, StoryObj } from "@storybook/react";

import { MuiThemeDecorator } from "../../../../.storybook/components";
import icons from "../../../../.storybook/components/iconUtils";

import { userEvent, waitFor, within } from "@storybook/testing-library";
import { expect } from "@storybook/jest";
import { axeRun } from "../../../axe-util";
import type { PlaywrightProps } from "../storybookTypes";
import { Box } from "@mui/material";

type playType = {
args: ButtonProps;
Expand Down
Loading