Skip to content

Commit

Permalink
[code-infra] Rename @mui-internal/docs-utils to @mui/internal-docs-ut…
Browse files Browse the repository at this point in the history
…ils (#41498)
  • Loading branch information
michaldudak authored Mar 15, 2024
1 parent f4f337c commit c76a373
Show file tree
Hide file tree
Showing 35 changed files with 53 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"installCommand": "install:codesandbox",
"node": "18",
"packages": [
"packages/docs-utils",
"packages/markdown",
"packages/mui-babel-macros",
"packages/mui-base",
Expand All @@ -23,6 +22,7 @@
"packages/mui-system",
"packages/mui-types",
"packages/mui-utils",
"packages-internal/docs-utils",
"packages-internal/scripts"
],
"publishDirectory": {
Expand All @@ -32,6 +32,7 @@
"@mui/docs": "packages/mui-docs/build",
"@mui/icons-material": "packages/mui-icons-material/build",
"@mui/internal-babel-macros": "packages/mui-babel-macros",
"@mui/internal-docs-utils": "packages-internal/docs-utils",
"@mui/internal-markdown": "packages/markdown",
"@mui/internal-scripts": "packages-internal/scripts",
"@mui/joy": "packages/mui-joy/build",
Expand All @@ -45,8 +46,7 @@
"@mui/styles": "packages/mui-styles/build",
"@mui/system": "packages/mui-system/build",
"@mui/types": "packages/mui-types/build",
"@mui/utils": "packages/mui-utils/build",
"@mui-internal/docs-utils": "packages/docs-utils"
"@mui/utils": "packages/mui-utils/build"
},
"sandboxes": [
"/examples/material-ui-cra-ts",
Expand Down
2 changes: 1 addition & 1 deletion apps/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ packages:
- 'local-ui-lib'
- 'pigment-*'
- '../packages/waterfall'
- '../packages/docs-utils'
- '../packages-internal/docs-utils'
- '../packages/test-utils'
- '../packages-internal/*'
- '../packages/mui-*'
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function getBabelConfig(api) {
'@mui/material-next': resolveAliasPath('./packages/mui-material-next/src'),
'@mui/joy': resolveAliasPath('./packages/mui-joy/src'),
'@pigment-css/react': resolveAliasPath('./packages/pigment-css-react/src'),
'@mui-internal/docs-utils': resolveAliasPath('./packages/docs-utils/src'),
'@mui/internal-docs-utils': resolveAliasPath('./packages-internal/docs-utils/src'),
docs: resolveAliasPath('./docs'),
test: resolveAliasPath('./test'),
};
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
"devDependencies": {
"@babel/plugin-transform-react-constant-elements": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@mui/internal-docs-utils": "workspace:^",
"@mui/internal-scripts": "workspace:^",
"@mui-internal/docs-utils": "workspace:^",
"@mui-internal/test-utils": "workspace:^",
"@types/autosuggest-highlight": "^3.2.3",
"@types/chai": "^4.3.12",
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/formattedTSDemos.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const {
createTypeScriptProjectBuilder,
} = require('@mui-internal/api-docs-builder/utils/createTypeScriptProject');
const yargs = require('yargs');
const { fixBabelGeneratorIssues, fixLineEndings } = require('@mui-internal/docs-utils');
const { fixBabelGeneratorIssues, fixLineEndings } = require('@mui/internal-docs-utils');
const { default: CORE_TYPESCRIPT_PROJECTS } = require('../../scripts/coreTypeScriptProjects');

const babelConfig = {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/ApiPage/list/ClassesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as React from 'react';
import { styled } from '@mui/material/styles';
import kebabCase from 'lodash/kebabCase';
import { ComponentClassDefinition } from '@mui-internal/docs-utils';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
import { useTranslate } from '@mui/docs/i18n';
import ExpandableApiItem, {
ApiItemContaier,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/no-danger */
import * as React from 'react';
import { useTranslate } from '@mui/docs/i18n';
import { ComponentClassDefinition } from '@mui-internal/docs-utils';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
import Box from '@mui/material/Box';
import ToggleDisplayOption, {
ApiDisplayOptions,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/ApiPage/table/ClassesTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/no-danger */
import * as React from 'react';
import { ComponentClassDefinition } from '@mui-internal/docs-utils';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
import { styled, alpha } from '@mui/material/styles';
import {
brandingDarkTheme as darkTheme,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@
"@babel/preset-typescript": "^7.23.3",
"@babel/register": "^7.23.7",
"@mnajdova/enzyme-adapter-react-18": "^0.2.0",
"@mui/internal-docs-utils": "workspace:^",
"@mui/internal-scripts": "workspace:^",
"@mui-internal/api-docs-builder": "workspace:^",
"@mui-internal/api-docs-builder-core": "workspace:^",
"@mui-internal/docs-utils": "workspace:^",
"@mui-internal/test-utils": "workspace:^",
"@mui/joy": "workspace:*",
"@mui/material": "workspace:^",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.0.3

Renamed the package to @mui/internal-docs-utils

## 1.0.2

Fixed incorrectly released package.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @mui-internal/docs-utils
# @mui/internal-docs-utils

This package contains utilities shared between MUI docs generation scripts.
This is an internal package not meant for general use.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mui-internal/docs-utils",
"version": "1.0.2",
"name": "@mui/internal-docs-utils",
"version": "1.0.3",
"author": "MUI Team",
"description": "Utilities for MUI docs. This is an internal package not meant for general use.",
"main": "./build/index.js",
Expand All @@ -11,7 +11,7 @@
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"directory": "packages/docs-utils"
"directory": "packages-internal/docs-utils"
},
"scripts": {
"prebuild": "rimraf ./build",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages-internal/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1.0.1

- Unpinned version of the @mui-internal/docs-utils dependency.
- Unpinned version of the @mui/internal-docs-utils dependency.
- Corrected the README file.

## 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@babel/plugin-syntax-jsx": "^7.23.3",
"@babel/plugin-syntax-typescript": "^7.23.3",
"@babel/types": "^7.23.9",
"@mui-internal/docs-utils": "workspace:^",
"@mui/internal-docs-utils": "workspace:^",
"doctrine": "^3.0.0",
"lodash": "^4.17.21",
"typescript": "^5.3.3",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/tsconfig.typecheck.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
},
"include": ["./**/*.ts"],
"exclude": ["./build", "./node_modules"],
"references": [{ "path": "../../packages/docs-utils/tsconfig.build.json" }]
"references": [{ "path": "../../packages-internal/docs-utils/tsconfig.build.json" }]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
GetPropsFromComponentDeclarationOptions,
getPropsFromComponentNode,
TypeScriptProject,
} from '@mui-internal/docs-utils';
} from '@mui/internal-docs-utils';
import {
createUnionType,
createUndefinedType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as ts from 'typescript';
import { expect } from 'chai';
import glob from 'fast-glob';
import prettier from 'prettier';
import { TypeScriptProject, createTypeScriptProjectBuilder } from '@mui-internal/docs-utils';
import { TypeScriptProject, createTypeScriptProjectBuilder } from '@mui/internal-docs-utils';
import { generatePropTypes } from '../src/generatePropTypes';
import { injectPropTypesInFile } from '../src/injectPropTypesInFile';
import { getPropTypesFromFile } from '../src/getPropTypesFromFile';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import remarkVisit from 'unist-util-visit';
import type { Link } from 'mdast';
import { defaultHandlers, parse as docgenParse, ReactDocgenApi } from 'react-docgen';
import { renderMarkdown } from '@mui/internal-markdown';
import { ComponentClassDefinition } from '@mui-internal/docs-utils';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
import { ProjectSettings, SortingStrategiesType } from '../ProjectSettings';
import { ComponentInfo, toGitHubPath, writePrettifiedFile } from '../buildApiUtils';
import muiDefaultPropsHandler from '../utils/defaultPropsHandler';
Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/ProjectSettings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentClassDefinition } from '@mui-internal/docs-utils';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
import { ComponentInfo, HookInfo } from './buildApiUtils';
import { CreateTypeScriptProjectOptions } from './utils/createTypeScriptProject';
import { CreateDescribeablePropSettings } from './utils/createDescribeableProp';
Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/buildApiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import * as ts from 'typescript';
import * as prettier from 'prettier';
import kebabCase from 'lodash/kebabCase';
import { getLineFeed } from '@mui-internal/docs-utils';
import { getLineFeed } from '@mui/internal-docs-utils';
import { replaceComponentLinks } from './utils/replaceUrl';
import { TypeScriptProject } from './utils/createTypeScriptProject';

Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@babel/core": "^7.23.9",
"@babel/preset-typescript": "^7.23.3",
"@babel/traverse": "^7.23.9",
"@mui-internal/docs-utils": "workspace:^",
"@mui/internal-docs-utils": "workspace:^",
"@mui/internal-markdown": "workspace:^",
"ast-types": "^0.14.2",
"doctrine": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"strict": true,
"baseUrl": "./",
"paths": {
"@mui-internal/docs-utils": ["../docs-utils/src"]
"@mui/internal-docs-utils": ["../docs-utils/src"]
}
},
"include": ["./**/*.ts", "./**/*.js"],
Expand Down
2 changes: 1 addition & 1 deletion packages/api-docs-builder/utils/parseSlotsAndClasses.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as ts from 'typescript';
import { ComponentClassDefinition } from '@mui-internal/docs-utils';
import { ComponentClassDefinition } from '@mui/internal-docs-utils';
import { renderMarkdown } from '@mui/internal-markdown';
import { getSymbolDescription, getSymbolJSDocTags } from '../buildApiUtils';
import { TypeScriptProject } from './createTypeScriptProject';
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"repository": {
"type": "git",
"url": "https://github.com/mui/material-ui.git",
"directory": "packages/docs-utils"
"directory": "packages/markdown"
},
"scripts": {
"release:publish": "pnpm publish --tag latest",
Expand Down
38 changes: 19 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/generateProptypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
fixBabelGeneratorIssues,
fixLineEndings,
getUnstyledFilename,
} from '@mui-internal/docs-utils';
} from '@mui/internal-docs-utils';
import {
getPropTypesFromFile,
injectPropTypesInFile,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@pigment-css/react/*": ["./packages/pigment-css-react/src/*"],
"@pigment-css/vite-plugin": ["./packages/pigment-css-vite-plugin/src"],
"@pigment-css/vite-plugin/*": ["./packages/pigment-css-vite-plugin/src/*"],
"@mui-internal/docs-utils": ["./packages/docs-utils/src"],
"@mui/internal-docs-utils": ["./packages-internal/docs-utils/src"],
"@mui/internal-scripts/typescript-to-proptypes": [
"./packages-internal/scripts/typescript-to-proptypes/src"
]
Expand Down
2 changes: 1 addition & 1 deletion webpackBaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
'@mui/material-nextjs': path.resolve(__dirname, './packages/mui-material-nextjs/src'),
'@mui/joy': path.resolve(__dirname, './packages/mui-joy/src'),
'@pigment-css/react': path.resolve(__dirname, './packages/pigment-css-react/src'),
'@mui-internal/docs-utils': path.resolve(__dirname, './packages/docs-utils/src'),
'@mui/internal-docs-utils': path.resolve(__dirname, './packages-internal/docs-utils/src'),
'@mui/internal-scripts/typescript-to-proptypes': path.resolve(
__dirname,
'./packages-internal/scripts/typescript-to-proptypes/src',
Expand Down

0 comments on commit c76a373

Please sign in to comment.