@mui/internal-code-infra 0.1.1-canary.17 → 0.1.1-canary.19

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.
@@ -8,9 +8,9 @@
8
8
  export declare const KEYRING_SERVICE = "mui-code-infra";
9
9
  /**
10
10
  * @param {string} key
11
- * @returns {Promise<string | undefined>}
11
+ * @returns {Promise<string | null>}
12
12
  */
13
- export declare function getPassword(key: string): Promise<string | undefined>;
13
+ export declare function getPassword(key: string): Promise<string | null>;
14
14
  /**
15
15
  * @param {string} key
16
16
  * @param {string} password
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-code-infra",
3
- "version": "0.1.1-canary.17",
3
+ "version": "0.1.1-canary.19",
4
4
  "author": "MUI Team",
5
5
  "description": "Infra scripts and configs to be used across MUI repos.",
6
6
  "license": "MIT",
@@ -72,7 +72,7 @@
72
72
  "@mui/internal-babel-plugin-display-name": "2.0.1-canary.2",
73
73
  "@mui/internal-babel-plugin-minify-errors": "3.0.1-canary.2",
74
74
  "@mui/internal-babel-plugin-resolve-imports": "3.0.1-canary.3",
75
- "@napi-rs/keyring": "^2.1.0",
75
+ "@napi-rs/keyring": "^2.1.1",
76
76
  "@octokit/auth-action": "^6.0.3",
77
77
  "@octokit/oauth-methods": "^6.0.5",
78
78
  "@octokit/plugin-retry": "^8.1.1",
@@ -81,8 +81,8 @@
81
81
  "@pnpm/config.version-policy": "^1100.2.7",
82
82
  "@pnpm/find-workspace-dir": "^1000.1.5",
83
83
  "@pnpm/parse-wanted-dependency": "^1001.0.0",
84
- "@typescript-eslint/types": "^8.71.1",
85
- "@typescript-eslint/utils": "^8.71.1",
84
+ "@typescript-eslint/types": "^8.71.2",
85
+ "@typescript-eslint/utils": "^8.71.2",
86
86
  "@vitest/eslint-plugin": "^1.6.27",
87
87
  "babel-plugin-optimize-clsx": "^2.6.2",
88
88
  "babel-plugin-react-compiler": "^1.0.0",
@@ -137,7 +137,7 @@
137
137
  "resolve-pkg-maps": "^1.0.0",
138
138
  "semver": "^7.8.5",
139
139
  "stylelint-config-standard": "^40.0.0",
140
- "typescript-eslint": "^8.71.1",
140
+ "typescript-eslint": "^8.71.2",
141
141
  "unified": "^11.0.5",
142
142
  "unified-lint-rule": "^3.0.1",
143
143
  "unist-util-visit": "^5.1.0",
@@ -166,12 +166,12 @@
166
166
  "@types/mdast": "4.0.4",
167
167
  "@types/regexp.escape": "2.0.0",
168
168
  "@types/yargs": "17.0.35",
169
- "@typescript-eslint/parser": "8.71.1",
170
- "@typescript-eslint/rule-tester": "8.71.1",
169
+ "@typescript-eslint/parser": "8.71.2",
170
+ "@typescript-eslint/rule-tester": "8.71.2",
171
171
  "@typescript/native": "npm:typescript@7.0.2",
172
172
  "eslint": "10.12.0",
173
173
  "get-port": "7.2.0",
174
- "prettier": "3.9.9",
174
+ "prettier": "3.9.10",
175
175
  "remark": "15.0.1",
176
176
  "remark-mdx": "3.1.1",
177
177
  "serve": "14.2.6",
@@ -190,7 +190,7 @@
190
190
  "publishConfig": {
191
191
  "access": "public"
192
192
  },
193
- "gitSha": "afa705d3e675d687aaa77f6a3448cd87ea6f5711",
193
+ "gitSha": "d5e2d4f1c7976bdaf932ed8abcd7fcd7a77160bc",
194
194
  "scripts": {
195
195
  "build": "tsc -p tsconfig.build.json",
196
196
  "typescript": "tsc -noEmit",
@@ -128,6 +128,18 @@ function withDefinitionComments(plugin) {
128
128
  };
129
129
  }
130
130
 
131
+ /**
132
+ * Makes the processor output the source text unchanged. The preset only lints, and
133
+ * remark-stringify doesn't round-trip Markdown (it escapes GitHub alerts, rewrites bare
134
+ * URLs, ...). eslint-plugin-mdx offers the processed output as a whole-file fix for any
135
+ * remark message, so with this `eslint --fix` leaves Markdown alone.
136
+ *
137
+ * @this {import('unified').Processor}
138
+ */
139
+ function remarkPreserveSource() {
140
+ this.compiler = (_tree, file) => String(file);
141
+ }
142
+
131
143
  /**
132
144
  * Returns a remark preset wiring the MUI-authored remark-lint plugins together
133
145
  * with a curated set of community plugins. Drop this into `.remarkrc.mjs`:
@@ -181,14 +193,12 @@ export function createRemarkConfig({ overrides = [], allowDefinitionComments = f
181
193
  });
182
194
 
183
195
  return {
184
- settings: {
185
- bullet: '-',
186
- emphasis: '_',
187
- fence: '`',
188
- listItemIndent: 'one',
189
- resourceLink: true,
190
- rule: '-',
191
- },
192
- plugins: [[remarkFrontmatter, ['yaml', 'toml']], remarkGfm, remarkLint, ...entries],
196
+ plugins: [
197
+ [remarkFrontmatter, ['yaml', 'toml']],
198
+ remarkGfm,
199
+ remarkLint,
200
+ ...entries,
201
+ remarkPreserveSource,
202
+ ],
193
203
  };
194
204
  }
@@ -23,11 +23,12 @@ const accessedCredentials = new Map();
23
23
 
24
24
  /**
25
25
  * @param {string} key
26
- * @returns {Promise<string | undefined>}
26
+ * @returns {Promise<string | null>}
27
27
  */
28
28
  export async function getPassword(key) {
29
- if (accessedCredentials.has(key)) {
30
- return accessedCredentials.get(key);
29
+ const cached = accessedCredentials.get(key);
30
+ if (cached) {
31
+ return cached;
31
32
  }
32
33
  let credential = credentials.get(key);
33
34
  if (!credential) {
@@ -6,6 +6,9 @@ level: error
6
6
  nonword: true
7
7
  action:
8
8
  name: replace
9
+ # Wider than upstream Google.Latin: also catches e.g/eg./i.e/ie. and any trailing
10
+ # punctuation, so no separate rule asks for "e.g." (which this one forbids).
11
+ # The lookbehind skips matches after a dot or inside a word (example.eg).
9
12
  swap:
10
- '\b(?:eg|e\.g\.)(?=[\s,;])': for example
11
- '\b(?:ie|i\.e\.)(?=[\s,;])': that is
13
+ '(?<![\w.])e\.?g\.?(?=[^\w.]|$)': for example
14
+ '(?<![\w.])i\.?e\.?(?=[^\w.]|$)': that is
@@ -1,14 +0,0 @@
1
- # Write things correctly, please no wrong references.
2
- extends: substitution
3
- message: Use '%s' instead of '%s'
4
- level: error
5
- ignorecase: false
6
- # swap maps tokens in form of bad: good
7
- # for more information: https://vale.sh/docs/topics/styles/#substitution
8
- swap:
9
- eg: e.g.
10
- eg\.: e.g.
11
- e\.g: e.g.
12
- ie: i.e.
13
- ie\.: i.e.
14
- i\.e: i.e.