@mui/internal-code-infra 0.0.3-canary.22 → 0.0.3-canary.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +47 -0
  2. package/build/babel-config.d.mts +36 -0
  3. package/build/cli/cmdArgosPush.d.mts +13 -0
  4. package/build/cli/cmdBuild.d.mts +52 -0
  5. package/build/cli/cmdCopyFiles.d.mts +20 -0
  6. package/build/cli/cmdExtractErrorCodes.d.mts +3 -0
  7. package/build/cli/cmdGithubAuth.d.mts +6 -0
  8. package/build/cli/cmdJsonLint.d.mts +9 -0
  9. package/build/cli/cmdListWorkspaces.d.mts +18 -0
  10. package/build/cli/cmdPublish.d.mts +19 -0
  11. package/build/cli/cmdPublishCanary.d.mts +12 -0
  12. package/build/cli/cmdPublishNewPackage.d.mts +8 -0
  13. package/build/cli/cmdSetVersionOverrides.d.mts +9 -0
  14. package/build/cli/index.d.mts +1 -0
  15. package/build/eslint/baseConfig.d.mts +10 -0
  16. package/build/eslint/docsConfig.d.mts +4 -0
  17. package/build/eslint/extensions.d.mts +8 -0
  18. package/build/eslint/index.d.mts +4 -0
  19. package/build/eslint/material-ui/config.d.mts +7 -0
  20. package/build/eslint/material-ui/index.d.mts +2 -0
  21. package/build/eslint/material-ui/rules/disallow-active-element-as-key-event-target.d.mts +5 -0
  22. package/build/eslint/material-ui/rules/disallow-react-api-in-server-components.d.mts +2 -0
  23. package/build/eslint/material-ui/rules/docgen-ignore-before-comment.d.mts +2 -0
  24. package/build/eslint/material-ui/rules/mui-name-matches-component-name.d.mts +5 -0
  25. package/build/eslint/material-ui/rules/no-empty-box.d.mts +5 -0
  26. package/build/eslint/material-ui/rules/no-restricted-resolved-imports.d.mts +12 -0
  27. package/build/eslint/material-ui/rules/no-styled-box.d.mts +5 -0
  28. package/build/eslint/material-ui/rules/rules-of-use-theme-variants.d.mts +9 -0
  29. package/build/eslint/material-ui/rules/straight-quotes.d.mts +5 -0
  30. package/build/eslint/testConfig.d.mts +12 -0
  31. package/build/markdownlint/duplicate-h1.d.mts +27 -0
  32. package/build/markdownlint/git-diff.d.mts +8 -0
  33. package/build/markdownlint/index.d.mts +56 -0
  34. package/build/markdownlint/straight-quotes.d.mts +8 -0
  35. package/build/markdownlint/table-alignment.d.mts +8 -0
  36. package/build/markdownlint/terminal-language.d.mts +8 -0
  37. package/build/prettier.d.mts +20 -0
  38. package/build/stylelint/index.d.mts +32 -0
  39. package/build/utils/babel.d.mts +66 -0
  40. package/build/utils/build.d.mts +48 -0
  41. package/build/utils/changelog.d.mts +88 -0
  42. package/build/utils/credentials.d.mts +17 -0
  43. package/build/utils/extractErrorCodes.d.mts +19 -0
  44. package/build/utils/github.d.mts +41 -0
  45. package/build/utils/pnpm.d.mts +243 -0
  46. package/build/utils/typescript.d.mts +35 -0
  47. package/package.json +38 -8
  48. package/src/cli/cmdBuild.mjs +2 -2
  49. package/src/cli/cmdGithubAuth.mjs +36 -0
  50. package/src/cli/cmdListWorkspaces.mjs +2 -2
  51. package/src/cli/cmdPublish.mjs +17 -6
  52. package/src/cli/cmdPublishCanary.mjs +4 -4
  53. package/src/cli/cmdPublishNewPackage.mjs +86 -0
  54. package/src/cli/cmdSetVersionOverrides.mjs +1 -1
  55. package/src/cli/index.mjs +4 -0
  56. package/src/stylelint/index.mjs +1 -1
  57. package/src/{cli → utils}/babel.mjs +2 -2
  58. package/src/utils/changelog.mjs +166 -0
  59. package/src/utils/credentials.mjs +71 -0
  60. package/src/utils/extractErrorCodes.mjs +2 -2
  61. package/src/utils/github.mjs +263 -0
  62. package/src/{cli → utils}/pnpm.mjs +19 -1
  63. /package/src/{cli → utils}/typescript.mjs +0 -0
package/README.md CHANGED
@@ -1,3 +1,50 @@
1
1
  # @mui/internal-code-infra
2
2
 
3
3
  Scripts and configs to be used across MUI repos.
4
+
5
+ ## Publishing packages
6
+
7
+ 1. Go to the publish action -
8
+
9
+ - [Base UI](https://github.com/mui/base-ui/actions/workflows/publish.yml)
10
+ - [Core](https://github.com/mui/material-ui/actions/workflows/publish.yml)
11
+ - [MUI X](https://github.com/mui/mui-x/actions/workflows/publish.yml)
12
+
13
+ 2. Choose "Run workflow" dropdown
14
+
15
+ > - **Branch:** master
16
+ > - **Commit SHA to release from:** the commit that contains the merged release on master. This commit is linked to the GitHub release.
17
+ > - **Run in dry-run mode:** Used for debugging.
18
+ > - **Create GitHub release:** Keep selected if you want a GitHub release to be automatically created from the changelog.
19
+ > - **npm dist tag to publish to** Use to publish legacy or canary versions.
20
+
21
+ 3. Click "Run workflow"
22
+ 4. Refresh the page to see the newly created workflow, and click it.
23
+ 5. The next screen shows "@username requested your review to deploy to npm-publish", click "Review deployments" and authorize your workflow run. **Never approve workflow runs you didn't initiaite.**
24
+
25
+ > [!IMPORTANT]
26
+ > Go through the below steps if there is an error that says `The following packages are new and need to be published manually first` in the publish flow.
27
+
28
+ ### Adding and publishing new packages
29
+
30
+ Whenever news packages are added to the repo (that will get published to npm) or a private package is turned into a public one, follow the below steps before invoking the publish workflow of the previous section.
31
+
32
+ 1. Goto your repo's code base on your system, open terminal and run:
33
+
34
+ ```bash
35
+ pnpm code-infra publish-new-package
36
+ ```
37
+
38
+ This command detects the new public packages in the repo and asks for your confirmation before publishing them to the npm registry. Add the `--dryRun` flag to skip the actual publishing.
39
+
40
+ 2. Goto the settings link for each packages, ie, https://www.npmjs.com/package/<pkg-name>/access , and setup `Trusted Publisher`.
41
+ 3. In `Select your publisher` step in the above link, click on the `Github Actions` button to configure Github actions based trusted publishing.
42
+ 4. Fill in the details of the repo -
43
+ 1. `Organization or user` as `mui`,
44
+ 2. `Repository` as per the new package
45
+ 3. `Workflow filename*` should be `publish.yml`
46
+ 4. `Environment name` should be `npm-publish`
47
+ 5. In the `Publishing access` section, toggle the recommended option of `Require two-factor authentication and disallow tokens`.
48
+ 6. Finally, save the changes by clicking on `Update Package Settings` button.
49
+
50
+ After following these steps, the `Publish` workflow can be invoked again.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @param {Object} param0
3
+ * @param {boolean} [param0.debug]
4
+ * @param {boolean} [param0.optimizeClsx]
5
+ * @param {boolean} [param0.removePropTypes]
6
+ * @param {boolean} [param0.noResolveImports]
7
+ * @param {'cjs' | 'esm'} param0.bundle
8
+ * @param {string | null} param0.outExtension - Specify the output file extension.
9
+ * @param {string} param0.runtimeVersion
10
+ * @returns {import('@babel/core').TransformOptions} The base Babel configuration.
11
+ */
12
+ export function getBaseConfig({ debug, optimizeClsx, removePropTypes, noResolveImports, bundle, runtimeVersion, outExtension, }: {
13
+ debug?: boolean | undefined;
14
+ optimizeClsx?: boolean | undefined;
15
+ removePropTypes?: boolean | undefined;
16
+ noResolveImports?: boolean | undefined;
17
+ bundle: "cjs" | "esm";
18
+ outExtension: string | null;
19
+ runtimeVersion: string;
20
+ }): import("@babel/core").TransformOptions;
21
+ /**
22
+ * @typedef {Object} Options
23
+ * @prop {'esm' | 'cjs'} [Options.bundle]
24
+ * @prop {boolean} [Options.noResolveImports]
25
+ * @prop {undefined} [options.env]
26
+ */
27
+ /**
28
+ * @param {import('@babel/core').ConfigAPI | Options} api
29
+ * @returns {import('@babel/core').TransformOptions}
30
+ */
31
+ export default function getBabelConfig(api: import("@babel/core").ConfigAPI | Options): import("@babel/core").TransformOptions;
32
+ export type Options = {
33
+ bundle?: "cjs" | "esm" | undefined;
34
+ noResolveImports?: boolean | undefined;
35
+ env?: undefined;
36
+ };
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * - Run with verbose logging
7
+ */
8
+ verbose?: boolean | undefined;
9
+ /**
10
+ * - Screenshots folder path
11
+ */
12
+ folder: string;
13
+ };
@@ -0,0 +1,52 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ /**
5
+ * - The bundles to build.
6
+ */
7
+ bundle: import("../utils/build.mjs").BundleType[];
8
+ /**
9
+ * - The large files to build.
10
+ */
11
+ hasLargeFiles: boolean;
12
+ /**
13
+ * - Whether to skip generating a package.json file in the /esm folder.
14
+ */
15
+ skipBundlePackageJson: boolean;
16
+ /**
17
+ * - The directory to copy the cjs files to.
18
+ */
19
+ cjsOutDir: string;
20
+ /**
21
+ * - Whether to enable verbose logging.
22
+ */
23
+ verbose: boolean;
24
+ /**
25
+ * - Whether to build types for the package.
26
+ */
27
+ buildTypes: boolean;
28
+ /**
29
+ * - Whether to build types for the package.
30
+ */
31
+ skipTsc: boolean;
32
+ /**
33
+ * - Whether to skip checking for Babel runtime dependencies in the package.
34
+ */
35
+ skipBabelRuntimeCheck: boolean;
36
+ /**
37
+ * - Whether to skip generating the package.json file in the bundle output.
38
+ */
39
+ skipPackageJson: boolean;
40
+ /**
41
+ * - Whether to skip checking for main field in package.json.
42
+ */
43
+ skipMainCheck: boolean;
44
+ /**
45
+ * - Globs to be ignored by Babel.
46
+ */
47
+ ignore: string[];
48
+ /**
49
+ * - Files/Directories to be copied. Can be a glob pattern.
50
+ */
51
+ copy?: string[] | undefined;
52
+ };
@@ -0,0 +1,20 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ /**
5
+ * Run in silent mode without logging
6
+ */
7
+ silent?: boolean | undefined;
8
+ /**
9
+ * Exclude default files from the copy operation
10
+ */
11
+ excludeDefaults?: boolean | undefined;
12
+ /**
13
+ * Glob patterns to copy
14
+ */
15
+ glob?: string[] | undefined;
16
+ /**
17
+ * Extra files to copy
18
+ */
19
+ files?: string[] | undefined;
20
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = import("../utils/extractErrorCodes.mjs").Args;
@@ -0,0 +1,6 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ authorize: boolean;
5
+ clear: boolean;
6
+ };
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * Run in silent mode without logging
7
+ */
8
+ silent?: boolean | undefined;
9
+ };
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type PublicPackage = import("../utils/pnpm.mjs").PublicPackage;
5
+ export type Args = {
6
+ /**
7
+ * - Whether to filter to only public packages
8
+ */
9
+ publicOnly?: boolean | undefined;
10
+ /**
11
+ * - Output format (name, path, or json)
12
+ */
13
+ output?: "name" | "json" | "path" | "publish-dir" | undefined;
14
+ /**
15
+ * - Git reference to filter changes since
16
+ */
17
+ sinceRef?: string | undefined;
18
+ };
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * Run in dry-run mode without publishing
7
+ */
8
+ "dry-run": boolean;
9
+ /**
10
+ * Create a GitHub draft release after publishing
11
+ */
12
+ "github-release": boolean;
13
+ /**
14
+ * NPM dist tag to publish to
15
+ */
16
+ tag: string;
17
+ };
18
+ export type PublicPackage = import("../utils/pnpm.mjs").PublicPackage;
19
+ export type PublishOptions = import("../utils/pnpm.mjs").PublishOptions;
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type PublicPackage = import("../utils/pnpm.mjs").PublicPackage;
5
+ export type VersionInfo = import("../utils/pnpm.mjs").VersionInfo;
6
+ export type PublishOptions = import("../utils/pnpm.mjs").PublishOptions;
7
+ export type Args = {
8
+ /**
9
+ * - Whether to run in dry-run mode
10
+ */
11
+ dryRun?: boolean | undefined;
12
+ };
@@ -0,0 +1,8 @@
1
+ declare const _default: import("yargs").CommandModule<{}, Args>;
2
+ export default _default;
3
+ export type Args = {
4
+ /**
5
+ * If true, will only log the commands without executing them
6
+ */
7
+ dryRun?: boolean | undefined;
8
+ };
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ declare const _default: import("yargs").CommandModule<{}, Args>;
3
+ export default _default;
4
+ export type Args = {
5
+ /**
6
+ * - Package version specifiers in format 'package@version'
7
+ */
8
+ pkg?: string[] | undefined;
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @param {Object} [params]
3
+ * @param {boolean} [params.enableReactCompiler] - Whether the config is for spec files.
4
+ * @param {string} params.baseDirectory - The base directory for the configuration.
5
+ * @returns {import('eslint').Linter.Config[]}
6
+ */
7
+ export function createBaseConfig({ enableReactCompiler, baseDirectory }?: {
8
+ enableReactCompiler?: boolean | undefined;
9
+ baseDirectory: string;
10
+ }): import("eslint").Linter.Config[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @returns {import('eslint').Linter.Config[]}
3
+ */
4
+ export function createDocsConfig(): import("eslint").Linter.Config[];
@@ -0,0 +1,8 @@
1
+ export const EXTENSION_JS: "?(c|m)js?(x)";
2
+ export const EXTENSION_JS_NO_MODULE: "js?(x)";
3
+ export const EXTENSION_TS: "?(c|m)[jt]s?(x)";
4
+ export const EXTENSION_TS_NO_MODULE: "[jt]s?(x)";
5
+ export const EXTENSION_TS_ONLY: "?(c|m)ts?(x)";
6
+ export const EXTENSION_TS_ONLY_NO_MODULE: "ts?(x)";
7
+ export const EXTENSION_DTS: ".d.?(c|m)ts?(x)";
8
+ export const EXTENSION_TEST_FILE: ".test.?(c|m)[jt]s?(x)";
@@ -0,0 +1,4 @@
1
+ export * from "./baseConfig.mjs";
2
+ export * from "./docsConfig.mjs";
3
+ export * from "./testConfig.mjs";
4
+ export * from "./extensions.mjs";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @param {Object} [options]
3
+ * @param {boolean} [options.reactCompilerEnabled] - Whether the config is for spec files.
4
+ */
5
+ export function createCoreConfig(options?: {
6
+ reactCompilerEnabled?: boolean | undefined;
7
+ }): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
@@ -0,0 +1,2 @@
1
+ declare const _default: import("eslint").ESLint.Plugin;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,12 @@
1
+ declare const _default: import("eslint").Rule.RuleModule;
2
+ export default _default;
3
+ export type PatternConfig = {
4
+ /**
5
+ * - The pattern to match against resolved imports
6
+ */
7
+ pattern: string;
8
+ /**
9
+ * - Custom message to show when the pattern matches
10
+ */
11
+ message?: string | undefined;
12
+ };
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ meta: {
3
+ type: "problem";
4
+ };
5
+ create(context: import("eslint").Rule.RuleContext): {
6
+ CallExpression(node: import("estree").CallExpression & import("eslint").Rule.NodeParentExtension): void;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default rule;
2
+ /**
3
+ * @type {import('eslint').Rule.RuleModule}
4
+ */
5
+ declare const rule: import("eslint").Rule.RuleModule;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @param {Object} [options]
3
+ * @param {boolean} [options.useMocha]
4
+ * @returns {import('eslint').Linter.Config[]}
5
+ */
6
+ export function createTestConfig(options?: {
7
+ useMocha?: boolean | undefined;
8
+ }): import("eslint").Linter.Config[];
9
+ /**
10
+ * @type {import('eslint').Linter.Config}
11
+ */
12
+ export const baseSpecRules: import("eslint").Linter.Config;
@@ -0,0 +1,27 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;
9
+ export type Attr = [string, string];
10
+ export type Token = {
11
+ type: string;
12
+ info: string;
13
+ tag: string;
14
+ content: string;
15
+ lineNumber: number;
16
+ attrs: Attr[];
17
+ };
18
+ export type OnErrorObj = {
19
+ lineNumber: number;
20
+ detail?: string | undefined;
21
+ };
22
+ export type OnError = (err: OnErrorObj) => void;
23
+ export type MdParams = {
24
+ name: string;
25
+ lines: string[];
26
+ tokens: Token[];
27
+ };
@@ -0,0 +1,8 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Create a base configuration for markdownlint.
3
+ * @param {Object} options
4
+ * @param {(typeof straightQuotes)[]} [options.rules] - An array of custom rules to include.
5
+ * @param {string[]} [options.ignores] - An array of glob patterns to ignore.
6
+ * @returns
7
+ */
8
+ export function createBaseConfig(options?: {
9
+ rules?: {
10
+ names: string[];
11
+ description: string;
12
+ tags: string[];
13
+ function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
14
+ }[] | undefined;
15
+ ignores?: string[] | undefined;
16
+ }): {
17
+ config: {
18
+ default: boolean;
19
+ MD004: boolean;
20
+ MD009: {
21
+ br_spaces: number;
22
+ strict: boolean;
23
+ list_item_empty_lines: boolean;
24
+ };
25
+ MD013: boolean;
26
+ MD014: boolean;
27
+ MD024: {
28
+ siblings_only: boolean;
29
+ };
30
+ MD025: {
31
+ level: number;
32
+ front_matter_title: string;
33
+ };
34
+ MD033: boolean;
35
+ MD034: boolean;
36
+ MD028: boolean;
37
+ MD029: boolean;
38
+ MD031: boolean;
39
+ MD036: boolean;
40
+ MD051: boolean;
41
+ MD052: boolean;
42
+ MD059: boolean;
43
+ straightQuotes: boolean;
44
+ gitDiff: boolean;
45
+ tableAlignment: boolean;
46
+ terminalLanguage: boolean;
47
+ duplicateH1: boolean;
48
+ };
49
+ customRules: {
50
+ names: string[];
51
+ description: string;
52
+ tags: string[];
53
+ function: (params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError) => void;
54
+ }[];
55
+ ignores: string[];
56
+ };
@@ -0,0 +1,8 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ declare namespace _default {
2
+ export let names: string[];
3
+ export let description: string;
4
+ export let tags: string[];
5
+ export function _function(params: import("./duplicate-h1.mjs").MdParams, onError: import("./duplicate-h1.mjs").OnError): void;
6
+ export { _function as function };
7
+ }
8
+ export default _default;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @param {Object} [options={}]
3
+ * @param {Override[]} [options.overrides]
4
+ * @returns {import('prettier').Config}
5
+ */
6
+ export function createBaseConfig(options?: {
7
+ overrides?: {
8
+ files: string | string[];
9
+ excludeFiles?: string | string[];
10
+ options?: import("prettier").Options;
11
+ }[] | undefined;
12
+ }): import("prettier").Config;
13
+ /**
14
+ * @typedef {Exclude<import('prettier').Config['overrides'], undefined>[number]} Override
15
+ */
16
+ /**
17
+ * @type {Override[]}
18
+ */
19
+ export const docsOverrides: Override[];
20
+ export type Override = Exclude<import("prettier").Config["overrides"], undefined>[number];
@@ -0,0 +1,32 @@
1
+ declare const _default: {
2
+ extends: (string | string[]) | undefined;
3
+ rules: {
4
+ 'no-descending-specificity': null;
5
+ 'alpha-value-notation': null;
6
+ 'custom-property-pattern': null;
7
+ 'media-feature-range-notation': null;
8
+ 'no-empty-source': null;
9
+ 'selector-class-pattern': null;
10
+ 'string-no-newline': null;
11
+ 'value-keyword-case': null;
12
+ 'import-notation': null;
13
+ 'at-rule-empty-line-before': null;
14
+ 'comment-empty-line-before': null;
15
+ 'custom-property-empty-line-before': null;
16
+ 'declaration-empty-line-before': null;
17
+ 'rule-empty-line-before': null;
18
+ 'at-rule-no-unknown': (boolean | {
19
+ ignoreAtRules: string[];
20
+ })[];
21
+ 'property-no-vendor-prefix': null;
22
+ 'property-no-deprecated': null;
23
+ 'declaration-property-value-keyword-no-deprecated': null;
24
+ 'color-hex-length': null;
25
+ 'declaration-block-no-redundant-longhand-properties': null;
26
+ };
27
+ overrides: {
28
+ files: string[];
29
+ customSyntax: any;
30
+ }[];
31
+ };
32
+ export default _default;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @param {string} pkgVersion
3
+ * @returns {Record<string, string>} An object containing version-related environment variables.
4
+ */
5
+ export function getVersionEnvVariables(pkgVersion: string): Record<string, string>;
6
+ /**
7
+ * Copies CommonJS files from one directory to another.
8
+ * @param {Object} param0
9
+ * @param {string} param0.from - The source directory.
10
+ * @param {string} param0.to - The destination directory.
11
+ * @returns {Promise<void>}
12
+ */
13
+ export function cjsCopy({ from, to }: {
14
+ from: string;
15
+ to: string;
16
+ }): Promise<void>;
17
+ /**
18
+ * @typedef {Object} ErrorCodeMetadata
19
+ * @property {string} outputPath - The path where the error code file should be written.
20
+ * @property {'annotate' | 'throw' | 'write'} [missingError] - How to handle missing error codes.
21
+ * @property {string} [runtimeModule] - The runtime module to replace the errors with.
22
+ */
23
+ /**
24
+ * @param {Object} options
25
+ * @param {boolean} [options.verbose=false] - Whether to enable verbose logging.
26
+ * @param {boolean} [options.optimizeClsx=false] - Whether to enable clsx call optimization transform.
27
+ * @param {boolean} [options.removePropTypes=true] - Whether to enable removal of React prop types.
28
+ * @param {string[]} [options.ignores] - The globs to be ignored by Babel.
29
+ * @param {string} options.cwd - The package root directory.
30
+ * @param {string} options.pkgVersion - The package version.
31
+ * @param {string} options.sourceDir - The source directory to build from.
32
+ * @param {string} options.outDir - The output directory for the build.
33
+ * @param {string} options.outExtension - The output file extension for the build.
34
+ * @param {boolean} options.hasLargeFiles - Whether the build includes large files.
35
+ * @param {import('./build.mjs').BundleType} options.bundle - The bundles to build.
36
+ * @param {string} options.babelRuntimeVersion - The version of @babel/runtime to use.
37
+ * @returns {Promise<void>}
38
+ */
39
+ export function babelBuild({ cwd, sourceDir, outDir, babelRuntimeVersion, hasLargeFiles, bundle, pkgVersion, outExtension, optimizeClsx, removePropTypes, verbose, ignores, }: {
40
+ verbose?: boolean | undefined;
41
+ optimizeClsx?: boolean | undefined;
42
+ removePropTypes?: boolean | undefined;
43
+ ignores?: string[] | undefined;
44
+ cwd: string;
45
+ pkgVersion: string;
46
+ sourceDir: string;
47
+ outDir: string;
48
+ outExtension: string;
49
+ hasLargeFiles: boolean;
50
+ bundle: import("./build.mjs").BundleType;
51
+ babelRuntimeVersion: string;
52
+ }): Promise<void>;
53
+ export type ErrorCodeMetadata = {
54
+ /**
55
+ * - The path where the error code file should be written.
56
+ */
57
+ outputPath: string;
58
+ /**
59
+ * - How to handle missing error codes.
60
+ */
61
+ missingError?: "throw" | "annotate" | "write" | undefined;
62
+ /**
63
+ * - The runtime module to replace the errors with.
64
+ */
65
+ runtimeModule?: string | undefined;
66
+ };