Skip to content

Commit b0d9387

Browse files
authored
Fix unpkg link (#13484)
1 parent cd3e530 commit b0d9387

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

docs/browser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Required options:
2020

2121
- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files named
2222

23-
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.2.1/> and
24-
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.2.1/esm/>
23+
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.7.1/> and
24+
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.7.1/esm/>
2525

2626
You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.
2727

scripts/release/steps/update-version.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ async function bump({ version }) {
2424

2525
// Update unpkg link in docs
2626
processFile("docs/browser.md", (content) =>
27-
content.replace(/(\/\/unpkg\.com\/prettier@).*?\//g, `$1${version}/`)
27+
content.replace(
28+
/(\/\/unpkg\.com\/(?:browse\/)?prettier@).*?\//g,
29+
`$1${version}/`
30+
)
2831
);
2932

3033
await runYarn(["update-stable-docs"], {

website/versioned_docs/version-stable/browser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Required options:
2121

2222
- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files named
2323

24-
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.2.1/> and
25-
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.2.1/esm/>
24+
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.7.1/> and
25+
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.7.1/esm/>
2626

2727
You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.
2828

0 commit comments

Comments
 (0)