Skip to content

Commit 642ea11

Browse files
authored
Change URL of playground build CDN (#3095)
1 parent fb8ea17 commit 642ea11

File tree

11 files changed

+23
-18
lines changed

11 files changed

+23
-18
lines changed

.changeset/calm-items-sparkle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@typescript/vfs": patch
3+
---
4+
5+
Move playground CDN to new, stable URL

packages/playground-handbook/copy/en/TypeScript Versions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The TypeScript Playground supports TypeScript versions all the way back to `3.3.
44

55
The ability to switch the version of TypeScript makes it easy to figure out potential regressions and to be able to let people test out new language features without having to upgrade their projects to (potentially) an unstable version of TypeScript. You can access the list of production TypeScript versions via a dropdown in the editor's toolbar inside the Playground. If there's a current beta or rc, that will show at the top.
66

7-
The dropdown shows the highest patch version for a TypeScript release, but that is not every version available. You can refer to these two JSON files for the full list of [release versions](https://typescript.azureedge.net/indexes/releases.json) and [pre-release versions](https://typescript.azureedge.net/indexes/pre-releases.json).
7+
The dropdown shows the highest patch version for a TypeScript release, but that is not every version available. You can refer to these two JSON files for the full list of [release versions](https://playgroundcdn.typescriptlang.org/indexes/releases.json) and [pre-release versions](https://playgroundcdn.typescriptlang.org/indexes/pre-releases.json).
88

99
Setting a TypeScript version will append `?ts=[version]` to your URL and reload. For example, setting the TypeScript version to 4.3.5 will add `?ts=4.3.5` to the URL, which is an OK segue to the overview of the [URL's structure](/play#handbook-10).
1010

packages/playground-handbook/copy/en/URL Structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Or to trigger some action in the Playground UI by default:
2222

2323
Then the query string tend to be about changing the state of the Playground setup from the default:
2424

25-
- `?ts=3.9.2` - Sets the TypeScript version, the list of supported versions is in these [two](https://typescript.azureedge.net/indexes/pre-releases.json) [json](https://typescript.azureedge.net/indexes/releases.json) files.
25+
- `?ts=3.9.2` - Sets the TypeScript version, the list of supported versions is in these [two](https://playgroundcdn.typescriptlang.org/indexes/pre-releases.json) [json](https://playgroundcdn.typescriptlang.org/indexes/releases.json) files.
2626

2727
There are two special cases for the `ts` option:
2828

packages/playground/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Or to trigger some action by default:
3333

3434
Then queries tend to be about changing the state of the Playground setup from the default:
3535

36-
- `?ts=3.9.2` - Sets the TypeScript version, the list of supported versions is in these [two](https://typescript.azureedge.net/indexes/pre-releases.json) [json](https://typescript.azureedge.net/indexes/releases.json) files.
36+
- `?ts=3.9.2` - Sets the TypeScript version, the list of supported versions is in these [two](https://playgroundcdn.typescriptlang.org/indexes/pre-releases.json) [json](https://playgroundcdn.typescriptlang.org/indexes/releases.json) files.
3737

3838
There are two special cases for the `ts` option:
3939

packages/sandbox/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ the same runtime loader patterns for importing into your web page. This package
4141
4242
// For the monaco version you can use unpkg or the TypeScript web infra CDN
4343
// You can see the available releases for TypeScript here:
44-
// https://typescript.azureedge.net/indexes/releases.json
44+
// https://playgroundcdn.typescriptlang.org/indexes/releases.json
4545
//
4646
require.config({
4747
paths: {
48-
vs: "https://typescript.azureedge.net/cdn/4.0.5/monaco/min/vs",
48+
vs: "https://playgroundcdn.typescriptlang.org/cdn/4.0.5/monaco/min/vs",
4949
// vs: 'https://unpkg.com/@typescript-deploys/[email protected]/min/vs',
5050
sandbox: "https://www.typescriptlang.org/js/sandbox",
5151
},

packages/sandbox/script/downloadReleases.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ const { join } = require("path")
88
const { format } = require("prettier")
99

1010
const go = async () => {
11-
const response = await fetch("https://typescript.azureedge.net/indexes/releases.json")
11+
const response = await fetch("https://playgroundcdn.typescriptlang.org/indexes/releases.json")
1212
const releases = await response.json()
1313
const versions = releases.versions.reverse()
1414

1515
// Look through the prereleases to see if the beta and RC are included in the pre-releases
1616
// and add those to the list of versions.
17-
const preReleaseResponse = await fetch("https://typescript.azureedge.net/indexes/pre-releases.json")
17+
const preReleaseResponse = await fetch("https://playgroundcdn.typescriptlang.org/indexes/pre-releases.json")
1818
const preReleases = await preReleaseResponse.json()
1919
const latestStable = versions[0]
2020

packages/typescript-vfs/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export const createDefaultMapFromCDN = (
316316
const fetchlike = fetcher || fetch
317317
const fsMap = new Map<string, string>()
318318
const files = knownLibFilesForCompilerOptions(options, ts)
319-
const prefix = `https://typescript.azureedge.net/cdn/${version}/typescript/lib/`
319+
const prefix = `https://playgroundcdn.typescriptlang.org/cdn/${version}/typescript/lib/`
320320

321321
function zip(str: string) {
322322
return lzstring ? lzstring.compressToUTF16(str) : str

packages/typescriptlang-org/src/pages/dev/bug-workbench.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const Play: React.FC<Props> = (props) => {
5454
let tsVersionParam = params.get("ts")
5555
// handle the nightly lookup
5656
if (!tsVersionParam || tsVersionParam && tsVersionParam === "Nightly" || tsVersionParam === "next") {
57-
// Avoids the CDN to doubly skip caching
58-
const nightlyLookup = await fetch("https://tswebinfra.blob.core.windows.net/indexes/next.json", { cache: "no-cache" })
57+
// The CDN is configured to have a short TTL on the indexes directory.
58+
const nightlyLookup = await fetch("https://playgroundcdn.typescriptlang.org/indexes/next.json", { cache: "no-cache" })
5959
const nightlyJSON = await nightlyLookup.json()
6060
tsVersionParam = nightlyJSON.version
6161
}
@@ -66,7 +66,7 @@ const Play: React.FC<Props> = (props) => {
6666
const re: any = global.require
6767
re.config({
6868
paths: {
69-
vs: `https://typescript.azureedge.net/cdn/${tsVersionParam}/monaco/dev/vs`,
69+
vs: `https://playgroundcdn.typescriptlang.org/cdn/${tsVersionParam}/monaco/dev/vs`,
7070
"typescript-sandbox": sandboxRoot,
7171
"typescript-playground": playgroundRoot,
7272
"unpkg": "https://unpkg.com/",

packages/typescriptlang-org/src/pages/dev/sandbox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Index: React.FC<Props> = props => {
2626

2727
re.config({
2828
paths: {
29-
vs: "https://typescript.azureedge.net/cdn/4.0.5/monaco/min/vs",
29+
vs: "https://playgroundcdn.typescriptlang.org/cdn/4.0.5/monaco/min/vs",
3030
sandbox: withPrefix("/js/sandbox"),
3131
},
3232
ignoreDuplicateModules: ["vs/editor/editor.main"],
@@ -238,11 +238,11 @@ export default async function () {
238238
239239
// For the monaco version you can use unpkg or the TypeSCript web infra CDN
240240
// You can see the available releases for TypeScript here:
241-
// https://typescript.azureedge.net/indexes/releases.json
241+
// https://playgroundcdn.typescriptlang.org/indexes/releases.json
242242
//
243243
require.config({
244244
paths: {
245-
vs: 'https://typescript.azureedge.net/cdn/4.0.5/monaco/min/vs',
245+
vs: 'https://playgroundcdn.typescriptlang.org/cdn/4.0.5/monaco/min/vs',
246246
// vs: 'https://unpkg.com/@typescript-deploys/[email protected]/min/vs',
247247
sandbox: 'https://www.typescriptlang.org/js/sandbox',
248248
},

packages/typescriptlang-org/src/pages/dev/twoslash.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Index: React.FC<Props> = props => {
4040

4141
re.config({
4242
paths: {
43-
vs: "https://typescript.azureedge.net/cdn/4.0.5/monaco/min/vs",
43+
vs: "https://playgroundcdn.typescriptlang.org/cdn/4.0.5/monaco/min/vs",
4444
sandbox: sandboxRoot,
4545
},
4646
ignoreDuplicateModules: ["vs/editor/editor.main"],

0 commit comments

Comments
 (0)