diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000000..63cbb735019b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'weekly' + groups: + github-actions: + patterns: + - '*' diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0974e3848441..e503a24336ef 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,8 +9,8 @@ jobs: runs-on: ubuntu-latest steps: # Check out, and set up the node/ruby infra - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "18.x" @@ -32,7 +32,7 @@ jobs: # Verify it compiles - run: yarn build-site - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 if: github.event_name == 'pull_request' with: name: site @@ -74,8 +74,8 @@ jobs: steps: # Check out, and set up the node infra - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "18.x" diff --git a/.github/workflows/close-preview.yml b/.github/workflows/close-preview.yml index 23eebb7ccf48..a8a6503f2f4f 100644 --- a/.github/workflows/close-preview.yml +++ b/.github/workflows/close-preview.yml @@ -15,6 +15,6 @@ jobs: steps: - uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROD }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PREVIEW }} action: close app_location: /dev/null diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index f72d1c63e92a..accf56a4601e 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Get PR/workflow run info id: get-info - uses: actions/github-script@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: script: | let pr; @@ -104,7 +104,7 @@ jobs: - name: Download site build from PR if: ${{ steps.get-info.outputs.result != 'null' }} - uses: actions/download-artifact@v4 + uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 with: name: site path: site @@ -116,7 +116,7 @@ jobs: if: ${{ steps.get-info.outputs.result != 'null' }} uses: Azure/static-web-apps-deploy@v1 with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROD }} + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PREVIEW }} repo_token: ${{ secrets.GITHUB_TOKEN }} action: "upload" app_location: "site" @@ -127,7 +127,7 @@ jobs: - name: Comment on PR # azure/static-web-apps-deploy seems to comment itself when the event is pull_request_target if: ${{ steps.get-info.outputs.result != 'null' && github.event_name != 'pull_request_target' }} - uses: actions/github-script@v7 + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 env: PR_NUMBER: ${{ fromJson(steps.get-info.outputs.result).pr }} SITE_URL: ${{ steps.deploy.outputs.static_web_app_url }} diff --git a/.github/workflows/deploy-prod-static.yml b/.github/workflows/deploy-prod-static.yml index a52ca9d304ab..6e0df0638d44 100644 --- a/.github/workflows/deploy-prod-static.yml +++ b/.github/workflows/deploy-prod-static.yml @@ -1,4 +1,4 @@ -name: Deploy to Azure Static Web Apps +name: Deploy to GitHub Pages on: push: @@ -26,11 +26,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: # Fetch the full history, to build attribution.json fetch-depth: 0 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "18.x" cache: yarn @@ -53,16 +53,6 @@ jobs: env: YARN_CHECKSUM_BEHAVIOR: ignore - - name: Deploy - id: builddeploy - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PROD }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "site" - skip_app_build: true - - name: Setup Pages uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 @@ -80,4 +70,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 \ No newline at end of file + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index 3d653a7643ed..4b72e997fb27 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -11,7 +11,7 @@ jobs: contents: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - run: | if [[ $(git log --format="%H" --since "50 days" | head -c1 | wc -c) == 0 ]]; then git config user.email "typescriptbot@microsoft.com" diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 000000000000..da882548ccdd --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,44 @@ +name: Publish packages + +on: + push: + branches: [v2] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Check out, and set up the node/ruby infra + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + with: + # Fetch the full history, to build attribution.json + fetch-depth: 0 + - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: "18.x" + registry-url: "https://registry.npmjs.org/" + cache: yarn + + - name: Prepare website v2 + run: | + yarn install + yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1 + yarn bootstrap + yarn workspace typescriptlang-org setup-playground-cache-bust + yarn build + env: + YARN_CHECKSUM_BEHAVIOR: ignore + + - name: Build website v2 + run: | + yarn build-site + cp -r packages/typescriptlang-org/public site + + # Deploy + - name: Deploy npm Packages + run: | + yarn pleb publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/update_teams.yml b/.github/workflows/update_teams.yml deleted file mode 100644 index 4e44059723d2..000000000000 --- a/.github/workflows/update_teams.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Send comments from updates -on: - issue_comment: { types: created } - -jobs: - apply-label: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@0.3.0 - env: - TEAMS_INCOMING_WEBHOOK_URL: ${{secrets.TEAMS_INCOMING_WEBHOOK_URL}} - with: - github-token: ${{github.token}} - - script: | - const fetch = require("node-fetch") - - const teamsURL = process.env.TEAMS_INCOMING_WEBHOOK_URL - if (!teamsURL) return console.log("Skipping sending the message because it's not the update repo") - - // console.log(context.payload) - - const issue = context.payload.issue - const issue_comment = context.payload.comment - - if (issue_comment.user.login !== "orta") return console.log(`Skipping because not orta`) - - if (issue.id !== 524510895) return console.log(`Skipping sending the message because ${issue.id} is not the update post`) - - const message = { - "@type": "MessageCard", - "@context": "https://schema.org/extensions", - summary: "Website update", - themeColor: "0078D7", - title: 'Website update', - sections: [ - { - activityTitle: "Comment", - activitySubtitle: issue_comment.created_at, - activityImage: issue_comment.user.avatar_url, - "text": issue_comment.body - } - ], - potentialAction: [ - { - "@type": "OpenUri", - name: "View in GitHub", - targets: [ - { - os: "default", - uri: issue_comment.html_url - } - ] - } - ] - }; - - fetch(teamsURL, { - method: "post", - body: JSON.stringify(message), - headers: { "Content-Type": "application/json" } - }); diff --git a/.github/workflows/v2-merged-staging.yml b/.github/workflows/v2-merged-staging.yml deleted file mode 100644 index 74ef4eb8601a..000000000000 --- a/.github/workflows/v2-merged-staging.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Build Website To Staging - -on: - push: - branches: [v2] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - # Check out, and set up the node/ruby infra - - uses: actions/checkout@v2 - with: - # Fetch the full history, to build attribution.json - fetch-depth: 0 - - uses: actions/setup-node@v2 - with: - node-version: "18.x" - registry-url: "https://registry.npmjs.org/" - cache: yarn - - # For Azure uploads - - run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash - - - name: Prepare website v2 - run: | - yarn install - yarn docs-sync pull microsoft/TypeScript-Website-localizations#main 1 - yarn bootstrap - yarn workspace typescriptlang-org setup-playground-cache-bust - yarn workspace typescriptlang-org setup-staging - yarn build - env: - YARN_CHECKSUM_BEHAVIOR: ignore - - - name: Build website v2 - run: | - yarn build-site - cp -r packages/typescriptlang-org/public site - - - name: Deploy + Publish to CDN - # You can find these keys here: - # https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/57bfeeed-c34a-4ffd-a06b-ccff27ac91b8/resourcegroups/typescriptlang-org/providers/Microsoft.Storage/storageAccounts/typescriptorgstaging/keys - env: - AZURE_STORAGE_ACCOUNT: "typescriptorgstaging" - AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_CDN_STAGING_CONNECTION_STRING }} - run: az storage blob upload-batch --overwrite -s ./site -d \$web - - - name: Build And Deploy - id: builddeploy - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_MEADOW_0C9756810 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} - action: "upload" - app_location: "site" - skip_app_build: true - - # Deploy - - name: Deploy npm Packages - run: | - yarn pleb publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} - - - name: Send a message to Microsoft Teams - if: ${{ failure() }} - uses: aliencube/microsoft-teams-actions@v0.8.0 - with: - webhook_uri: ${{ secrets.TEAMS_WEB_BOT_INCOMING_URL }} - title: Staging deploy failed - summary: Could not build the site for staging - actions: '[{ "@type": "OpenUri", "name": "View Logs", "targets": [{ "os": "default", "uri": "https://github.com/microsoft/TypeScript-Website/actions/runs/${{ github.run_id }}?check_suite_focus=true" }] }]' diff --git a/.gitignore b/.gitignore index bbc0c7e33fde..6a08bd29ab2c 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,9 @@ packages/sandbox/src/release_data.ts packages/typescriptlang-org/src/lib/documentationNavigation.ts .idea/ + +**/.vscode/* +!**/.vscode/tasks.json +!**/.vscode/settings.template.json +!**/.vscode/launch.json +!**/.vscode/extensions.json diff --git a/.vscode/settings.json b/.vscode/settings.template.json similarity index 90% rename from .vscode/settings.json rename to .vscode/settings.template.json index 92c74263b121..f3027adde420 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.template.json @@ -5,5 +5,5 @@ "**/packages/typescriptlang-org/.cache/*": true }, "typescript.tsdk": "node_modules/typescript/lib", - "deno.enable": false, + "deno.enable": false } diff --git a/README.md b/README.md index 4d21b944fd89..0dd08e1bcd79 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ ### Meta -- **URLs:** [production](https://www.typescriptlang.org), [staging](http://www.staging-typescript.org/) -- **Admin:** Prod: [Azure Portal](https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/99160d5b-9289-4b66-8074-ed268e739e8e/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/TypeScript-1ebb3390-2634-4956-a955-eab987b7bb25/appServices), [Deploy logs](https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/99160d5b-9289-4b66-8074-ed268e739e8e/resourceGroups/Default-Web-WestUS/providers/Microsoft.Web/sites/TypeScript-1ebb3390-2634-4956-a955-eab987b7bb25/vstscd) +- **URLs:** [production](https://www.typescriptlang.org) - **Translations:** [microsoft/TypeScript-Website-Localizations](https://github.com/microsoft/TypeScript-Website-Localizations) ### Getting Started @@ -33,8 +32,6 @@ Some useful knowledge you need to know: - All packages have: `yarn build` and `yarn test` - All packages use [debug](https://www.npmjs.com/package/debug) - which means you can do `env DEBUG="*" yarn test` to get verbose logs -You can manually via GH Actions for [production here](https://github.com/microsoft/TypeScript-Website/actions?query=workflow%3A%22Monday+Website+Push+To+Production%22) and [staging here](https://github.com/microsoft/TypeScript-Website/actions?query=workflow%3A%22Build+Website+To+Staging%22). - Having issues getting set up? [Consult the troubleshooting](./docs/Setup%20Troubleshooting.md). ## Deployment @@ -102,7 +99,7 @@ yarn workspace tsconfig-reference run lint resolveJson ## Documentation -The docs for TypeScript. Originally ported over from [microsoft/TypeScript-Handbook](https://github.com/microsoft/TypeScript-Handbook/) then intermingled with [microsoft/TypeScript-New-Handbook](https://github.com/microsoft/TypeScript-New-Handbook), and finally updated for [Twoslash](http://www.staging-typescript.org/dev/twoslash/) and with new content. +The docs for TypeScript. Originally ported over from [microsoft/TypeScript-Handbook](https://github.com/microsoft/TypeScript-Handbook/) then intermingled with [microsoft/TypeScript-New-Handbook](https://github.com/microsoft/TypeScript-New-Handbook). ## JSON Schema diff --git a/docs/Converting Twoslash Code Samples.md b/docs/Converting Twoslash Code Samples.md index 6e498e58adf2..dc410248c180 100644 --- a/docs/Converting Twoslash Code Samples.md +++ b/docs/Converting Twoslash Code Samples.md @@ -65,4 +65,4 @@ x = [10, "hello"]; --- -A twoslash code sample can do _a lot_ - the best documentation for twoslash lives inside the [bug workbench](https://www.staging-typescript.org/dev/bug-workbench) where you can test your code sample live and read how it all works. +A twoslash code sample can do _a lot_ - the best documentation for twoslash lives inside the [bug workbench](https://www.typescriptlang.org/dev/bug-workbench) where you can test your code sample live and read how it all works. diff --git a/docs/Something Went Wrong.md b/docs/Something Went Wrong.md index f52232babf03..6d107d2ed7e0 100644 --- a/docs/Something Went Wrong.md +++ b/docs/Something Went Wrong.md @@ -20,11 +20,10 @@ We're currently running on App Service, the places where you can find info: The build to deploy train normally looks like this: -- `v2` branch gets pushed: -- A deploy is made to azure blob storage via [`.github/workflows/v2-merged-staging.yml`](https://github.com/microsoft/TypeScript-website/blob/v2/.github/workflows/v2-merged-staging.yml) -- Every Monday, a deploy is made from v2 to the production app via [`.github/workflows/deploy-prod.yml`](https://github.com/microsoft/TypeScript-website/blob/v2/.github/workflows/deploy-prod.yml) +- `v2` branch gets pushed +- The website is deployed to GitHub pages -You can deploy `v2` to production anytime via the ["Run workflow" button here](https://github.com/microsoft/TypeScript-Website/actions?query=workflow%3A%22Monday+Website+Push+To+Production%22), so if you have an emergency commit - it goes to `v2` then you can run the action. +You can deploy `v2` to production anytime via the ["Run workflow" button here](https://github.com/microsoft/TypeScript-Website/actions/workflows/deploy-prod-static.yml), so if you have an emergency commit - it goes to `v2` then you can run the action. App Service apps are configured by [`Web.config`](https://github.com/microsoft/TypeScript-website/blob/v2/packages/typescriptlang-org/static/Web.config). [Here's a reference on the format](https://hangouts.google.com/call/H553wrJ9d97l2LMpNh9hAEEE). I've seen files (`*.json` & `*.manifest`) be 404s on the site because they were not in the config. diff --git a/packages/create-typescript-playground-plugin/template/CONTRIBUTING.md b/packages/create-typescript-playground-plugin/template/CONTRIBUTING.md index d2ebf211a628..0066cb92ccbd 100644 --- a/packages/create-typescript-playground-plugin/template/CONTRIBUTING.md +++ b/packages/create-typescript-playground-plugin/template/CONTRIBUTING.md @@ -63,4 +63,4 @@ Once you're happy and it's polished, you can apply to have it in the default plu ## Support -Ask questions either on the TypeScript Website issues](https://github.com/microsoft/TypeScript-Website/issues), or in the [TypeScript Community Discord](https://discord.gg/typescript) - in the TypeScript Website channel. +Ask questions either on the [TypeScript Website issues](https://github.com/microsoft/TypeScript-Website/issues), or in the [TypeScript Community Discord](https://discord.gg/typescript) - in the TypeScript Website channel. diff --git a/packages/create-typescript-playground-plugin/template/scripts/getDTS.js b/packages/create-typescript-playground-plugin/template/scripts/getDTS.js index cb88fffcc13f..92d8696a9336 100644 --- a/packages/create-typescript-playground-plugin/template/scripts/getDTS.js +++ b/packages/create-typescript-playground-plugin/template/scripts/getDTS.js @@ -22,7 +22,7 @@ const go = async () => { if (!existsSync(vendor)) mkdirSync(vendor) if (!existsSync(ds)) mkdirSync(ds) - const host = "https://www.staging-typescript.org" + const host = "https://www.typescriptlang.org" // For playground-dev purposes // const host = "http://localhost:8000"; diff --git a/packages/playground/src/sidebar/fixtures/npmPlugins.ts b/packages/playground/src/sidebar/fixtures/npmPlugins.ts index aa2df668c94a..8cd8d9aea9e1 100644 --- a/packages/playground/src/sidebar/fixtures/npmPlugins.ts +++ b/packages/playground/src/sidebar/fixtures/npmPlugins.ts @@ -34,7 +34,7 @@ export const allNPMPlugins = [ description: "TypeScript playground plugin to display instant documentation.", author: "atanasster", - href: "https://github.com/ccontrols/structured-types", + href: "https://www.npmjs.com/package/%40structured-types%2Finstant-documentation-plugin", }, { name: "Code Show Flow", @@ -112,13 +112,6 @@ export const allNPMPlugins = [ author: "orta", href: "https://github.com/orta/playground-ts-symbols", }, - { - name: "Dts Plugin", - id: "playground-dts-plugin", - description: "Generate d.ts from JS", - author: "sanders_n", - href: "https://github.com/sandersn/playground-dts-plugin", - }, { name: "GitHub Explorer", id: "ts-playground-plugin-github-explorer", @@ -126,6 +119,13 @@ export const allNPMPlugins = [ author: "emnudge", href: "https://www.npmjs.com/package/ts-playground-plugin-github-explorer", }, + { + name: "Dts Plugin", + id: "playground-dts-plugin", + description: "Generate d.ts from JS", + author: "sanders_n", + href: "https://github.com/sandersn/playground-dts-plugin", + }, { name: "TypeScript Json Schema", id: "playground-typescript-json-schema", diff --git a/packages/ts-twoslasher/CHANGELOG.md b/packages/ts-twoslasher/CHANGELOG.md index a9dac0c4f939..d667236fa425 100644 --- a/packages/ts-twoslasher/CHANGELOG.md +++ b/packages/ts-twoslasher/CHANGELOG.md @@ -107,7 +107,7 @@ const b = "345" ``` Now returns correct query responses, I needed this for the bug workbench. -http://www.staging-typescript.org/dev/bug-workbench +http://www.typescriptlang.org/dev/bug-workbench Also has a way to set the defaults for the config diff --git a/packages/typescriptlang-org/package.json b/packages/typescriptlang-org/package.json index 39bf8d9638a4..ac4137d7aaab 100644 --- a/packages/typescriptlang-org/package.json +++ b/packages/typescriptlang-org/package.json @@ -11,7 +11,6 @@ "update-static-assets": "node scripts/downloadSearchAssets.js", "update-versions": "node scripts/getTypeScriptNPMVersions.js", "setup-playground-cache-bust": "node scripts/cacheBustPlayground.mjs", - "setup-staging": "node scripts/setupStaging.mjs", "create-lighthouse-json": "node scripts/createLighthouseJSON.js", "compile-index-examples": "twoslash --reactAlso src/components/index/twoslash/*.ts src/components/index/twoslash/*.js src/components/index/twoslash/*.tsx src/components/index/twoslash/generated && node scripts/updateIndexTwoslashExamples.js", "start": "gatsby develop", diff --git a/packages/typescriptlang-org/scripts/createLighthouseJSON.js b/packages/typescriptlang-org/scripts/createLighthouseJSON.js index a340d154dc71..ea54dfb8b8b5 100644 --- a/packages/typescriptlang-org/scripts/createLighthouseJSON.js +++ b/packages/typescriptlang-org/scripts/createLighthouseJSON.js @@ -4,7 +4,7 @@ const { join } = require("path") const parser = require("xml-js") const prRoot = - process.env.PR_DEPLOY_URL_ROOT || "https://www.staging-typescript.org/" + process.env.PR_DEPLOY_URL_ROOT || "https://www.typescriptlang.org/" const go = async () => { const sitemap = `${prRoot}/sitemap.xml` diff --git a/packages/typescriptlang-org/scripts/setupStaging.mjs b/packages/typescriptlang-org/scripts/setupStaging.mjs deleted file mode 100644 index 0f708eb8cfdb..000000000000 --- a/packages/typescriptlang-org/scripts/setupStaging.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import fs from "fs" - -const toChange = "src/components/HeadSEO.tsx" -const content = fs - .readFileSync(toChange, "utf8") - .replace("const staging = false", "const staging = true") - -fs.writeFileSync(toChange, content) diff --git a/packages/typescriptlang-org/src/components/HeadSEO.tsx b/packages/typescriptlang-org/src/components/HeadSEO.tsx index d49c62496691..51414647a668 100644 --- a/packages/typescriptlang-org/src/components/HeadSEO.tsx +++ b/packages/typescriptlang-org/src/components/HeadSEO.tsx @@ -16,9 +16,7 @@ export const HeadSEO = (props: SeoProps) => { "twitter:site": "typescriptlang", } - // Skip search engine indexing on the staging site, this is changed by running: - // yarn workspace typescriptlang-org setup-staging - const staging = false; + // do we want localized pages to be the english version? //{seo.url && } @@ -33,7 +31,6 @@ export const HeadSEO = (props: SeoProps) => { <> - { staging ? : null } { Object.keys(ogTags).map(k => ) } diff --git a/packages/typescriptlang-org/src/pages/dev/bug-workbench.tsx b/packages/typescriptlang-org/src/pages/dev/bug-workbench.tsx index 3321e1468fdd..eaeb5f4f8887 100755 --- a/packages/typescriptlang-org/src/pages/dev/bug-workbench.tsx +++ b/packages/typescriptlang-org/src/pages/dev/bug-workbench.tsx @@ -57,7 +57,7 @@ const Play: React.FC = (props) => { const nightlyJSON = await nightlyLookup.json() tsVersionParam = nightlyJSON.version } - // Allow prod/staging builds to set a custom commit prefix to bust caches + // Allow prod builds to set a custom commit prefix to bust caches const { sandboxRoot, playgroundRoot, playgroundWorker } = getPlaygroundUrls() // @ts-ignore diff --git a/packages/typescriptlang-org/src/pages/dev/twoslash.tsx b/packages/typescriptlang-org/src/pages/dev/twoslash.tsx index cd420108f84d..d188b924f0e7 100755 --- a/packages/typescriptlang-org/src/pages/dev/twoslash.tsx +++ b/packages/typescriptlang-org/src/pages/dev/twoslash.tsx @@ -32,7 +32,7 @@ const Index: React.FC = props => { getLoaderScript.src = withPrefix("/js/vs.loader.js") getLoaderScript.async = true getLoaderScript.onload = () => { - // Allow prod/staging builds to set a custom commit prefix to bust caches + // Allow prod builds to set a custom commit prefix to bust caches const {sandboxRoot} = getPlaygroundUrls() // @ts-ignore diff --git a/packages/typescriptlang-org/src/templates/play.tsx b/packages/typescriptlang-org/src/templates/play.tsx index 6ea309a38a1a..1dd3ce390625 100644 --- a/packages/typescriptlang-org/src/templates/play.tsx +++ b/packages/typescriptlang-org/src/templates/play.tsx @@ -113,7 +113,7 @@ const Play: React.FC = (props) => { return } - // Allow prod/staging builds to set a custom commit prefix to bust caches + // Allow prod builds to set a custom commit prefix to bust caches const { sandboxRoot, playgroundRoot, playgroundWorker } = getPlaygroundUrls() // @ts-ignore