Creates CDN Versions of Monaco and Monaco TypeScript for TypeScript web infra
Перейти к файлу
TypeScript Bot f2126ccf61 Automated commit to keep GitHub Actions active 2024-11-01 00:14:02 +00:00
.github Pass auth-mode login, I guess 2024-04-10 15:39:04 -07:00
pulls Link to typescriptlang.org instead of staging-typescript.org 2024-04-16 15:13:33 -07:00
scripts Remove old blob collection use (#23) 2024-06-03 12:00:29 -07:00
.gitignore Re-deploy the azure pipeline tarball to pm for permenent storage 2020-12-08 13:49:08 +00:00
CODE_OF_CONDUCT.md Ensure all the MS files are hooked up right 2020-06-29 09:16:02 -04:00
LICENSE Ensure all the MS files are hooked up right 2020-06-29 09:16:02 -04:00
README.md README update 2021-11-16 17:13:45 +00:00
SECURITY.md Ensure all the MS files are hooked up right 2020-06-29 09:16:02 -04:00
exec.js Log STDIO 2022-03-29 16:18:39 -07:00
make-git-tags-for-new-builds.js Don’t try to make tags that already exist 2022-09-27 11:41:18 -07:00
package.json Bump node-fetch from 2.6.0 to 2.6.7 2022-02-14 19:55:23 +00:00
publish-monaco-editor.js Revert "Force dts emit" 2024-04-25 13:57:29 -07:00
upload-assets-to-blob-storage.js Remove old blob collection use (#23) 2024-06-03 12:00:29 -07:00
yarn.lock Bump node-fetch from 2.6.0 to 2.6.7 2022-02-14 19:55:23 +00:00

README.md

Monaco Daily Builds

Uses GitHub Actions to deploy builds of monaco-editor using TypeScript releases, nightlies or PR builds.

These live inside typescript-deploys account on npm, credentials are in the JSTS Azure Keyvault.

See the module releases (monaco-editor - click 'versions'), GitHub releases & daily script.

Nightlies

The Playground will access https://typescript.azureedge.net/indexes/releases/next.json to see what the latest version is of Monaco for TypeScript is.

Pull Request Builds

An external system can trigger a pull request build for any Pull Request. It can handle multiple builds in the same PR. These are triggered via HTTP requests which have a GitHub auth token

This workflow is triggered from an API call where XXX is your token and YYY is the PR that it should look at.

curl https://api.github.com/repos/microsoft/typescript-make-monaco-builds/dispatches \
  -XPOST \
   -H 'Content-Type: application/json' \
   -H 'Accept: application/vnd.github.everest-preview+json' \
   -H "Authorization: token XXX" \
   --data-binary '{ "event_type": "YYY" }'

It will generate a PR build to NPM with the a version like: 3.7.0-33290-47 where 3.7.0 is the major version, 33290 is the PR and 47 is the index of the most recent comment from ts-bot which includes a static build of a pull request.

Tag Builds

When you want to trigger a build for a /specific/ build of TypeScript, you can ship a tag to this repo with the same version which is available on the TypeScript npm module.

Chance are that you dont need to do this because the nightly_check_prod_deploys.yml will sync the tags with TypeScript every night.

CDN'd

Every release has a corresponding upload to azure blob storage of:

  • the NPM module contents of the TypeScript version (so you can grab lib files)
  • the NPM module contents of monaco-typescript, so playgrounds can use custom builds of typescript

There are two indexes of all uploaded TypeScript and Monaco-Editor versions. It's important to note that Monaco Editor is indexed by the version of TypeScript it supports - not the version of the monaco-editor package.

You can use the values from the two indexes to make links like:


Re-deploying a tag

Delete the local tag, re-create it, and force push it up:

git tag -d 3.8.2 && git tag 3.8.2 && git push origin 3.8.2 -f

Note that npm won't allow re-publishing the same version, so you better do it quick if you need to edit it. The playground doesn't use the npm versions however, so they will get updated.

Troubleshooting

Are you here because of a failing build? Chances are your issue comes up from a require statement inside the TypeScript codebase. The logs will let you know if this is the issue.

This has happened a few times, you need to go to microsoft/monaco-editor and look at ./build/importTypeScript.js. Fix it there (I update the TS version in that repo, then fix the script, and send a PR for just that script change: e.g. #72) then come back to the file in this repo: ./publish-monaco-ts.js and add a step to merge in your new PR e.g. #3.

You can run the following commands to replicate the general behavior without side-effects:

  • SKIP_DEPLOY=1 node ./publish-monaco-editor.js next

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.