Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 51 additions & 43 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
with:
node-version: "13.x"

# Cache yarn deps, to speed up CI
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -24,71 +25,78 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-

# Get local dependencies
# Get dependencies for building the ebooks
- run: sudo apt-get update
- run: sudo apt install calibre

# Install, should be absically instant if cached
- run: yarn install
env:
YARN_CHECKSUM_BEHAVIOR: ignore

# Verify dependencies are hooked up right
- run: node test/verifyPackageVersions.js
# Launch

# Build the packages
- run: yarn bootstrap
- run: yarn workspace typescriptlang-org build
- run: yarn compile

# PR: Deploy if we can
- name: Deploy PR Version
if: github.event_name == 'pull_request'
run: 'if test -z "$NOW_ACCESS_TOKEN"; then echo "Skipping deploy";
else cp -r packages/typescriptlang-org/public packages/typescriptlang-org/typescript-v2-$PR_NUMBER ; npx now packages/typescriptlang-org/typescript-v2-$PR_NUMBER --token="$NOW_ACCESS_TOKEN" --confirm --prod; fi'
env:
NOW_ACCESS_TOKEN: ${{ secrets.NOW_ACCESS_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}

# Run any tests
# PR deploys via static web apps
- name: "Make a fake 'app' for the azure project of the static HTML"
run: |
mkdir fakeapp
mv packages/typescriptlang-org/public fakeapp/public
ls fakeapp
ls fakeapp/public
echo '{ "name": "fake", "scripts": { "build": "" } }' > fakeapp/package.json

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_MEADOW_0C9756810 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "fakeapp" # App source code path
api_location: "api" # Api source code path - optional
app_artifact_location: "public" # Built app content directory - optional
###### End of Repository/Build Configurations ######

# Verify it compiles
- run: yarn compile
# Run all the package's tests
- run: yarn test
env:
CI: true

- name: "Validates that TypeScript plugins work"
run: npm init typescript-playground-plugin playground-my-plugin

lighthouse_danger:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: "13.x"
# - run: yarn workspace typescriptlang-org run create-lighthouse-json
# env:
# PR_NUMBER: ${{ github.event.pull_request.number }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- run: yarn install

- run: yarn workspace typescriptlang-org run create-lighthouse-json
env:
PR_NUMBER: ${{ github.event.pull_request.number }}

- name: Run Lighthouse and test budgets
uses: orta/lighthouse-ci-action@ort-fork-pr-29
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
# - name: Run Lighthouse and test budgets
# uses: orta/lighthouse-ci-action@ort-fork-pr-29
# env:
# PR_NUMBER: ${{ github.event.pull_request.number }}

# danger for PR builds
- if: github.event_name == 'pull_request'
run: 'if test -z "$GITHUB_TOKEN"; then echo "Skipping danger"; else yarn danger ci; fi'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_MEADOW_0C9756810 }}
action: "close"
47 changes: 0 additions & 47 deletions .github/workflows/azure-static-web-apps-nice-meadow-0c9756810.yml

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"name": "root",
"workspaces": [
"packages/create-typescript-playground-plugin",
"packages/typescript-vfs",
Expand Down Expand Up @@ -41,15 +42,15 @@
]
},
"scripts": {
"bootstrap": "yarn workspaces foreach -v -a run bootstrap && BOOTSTRAPPING=true yarn workspaces foreach -v -a run build",
"bootstrap": "yarn workspaces foreach -v -a --exclude root run bootstrap && BOOTSTRAPPING=true yarn workspaces foreach -v -a --exclude root run build",
"start": "concurrently -p \"[{name}]\" -n \"BUILD,SITE\" -c \"bgBlue.bold,bgMagenta.bold\" \"node watcher.js\" \"yarn workspace typescriptlang-org start\" --kill-others",
"start-twoslash": "concurrently -p \"[{name}]\" -n \"BUILD,SITE\" -c \"bgBlue.bold,bgMagenta.bold\" \"node watcher.js\" \"yarn workspace typescriptlang-org start-twoslash\" --kill-others",
"build": "yarn workspaces foreach -v -a run build",
"build": "yarn workspaces foreach -v -a --exclude root run build",
"build-site": "yarn workspace typescriptlang-org build",
"compile": "yarn workspace typescriptlang-org tsc",
"update-snapshots": "yarn workspace typescriptlang-org update-snapshots",
"clean": "yarn workspace typescriptlang-org gatsby clean",
"test": "CI=true yarn workspaces foreach -v -a run test"
"test": "CI=true yarn workspaces foreach -v -a --exclude root run test"
},
"dependencies": {
"@types/express": "^4.17.6",
Expand Down
1 change: 1 addition & 0 deletions packages/typescriptlang-org/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config.onCreateWebpackConfig = ({ loaders, actions }) => {
},
externals: {
pnpapi: "commonjs pnpapi",
fs: "commonjs fs",
},
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export function getDocumentationNavForLanguage(
title: "Triple-Slash Directives",
id: "triple-slash-directives",
permalink: "/docs/handbook/triple-slash-directives.html",
oneline: "How to use triple slash directives in TypeScripit",
oneline: "How to use triple slash directives in TypeScript",
},
{
title: "Type Compatibility",
Expand Down Expand Up @@ -846,7 +846,7 @@ export function getDocumentationNavForLanguage(
title: "Triple-Slash Directives",
id: "triple-slash-directives",
permalink: "/docs/handbook/triple-slash-directives.html",
oneline: "How to use triple slash directives in TypeScripit",
oneline: "How to use triple slash directives in TypeScript",
},
{
title: "Type Compatibility",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const conferences =
]


const QuarterOrHalfRow = (props: { children: any, className?: string }) => <div className={[props.className, "split-row"].join(" ")}>{props.children}</div>
const Row = (props: { children: any, className?: string }) => <div className={[props.className, "row"].join(" ")}>{props.children}</div>
const Col = (props: { children: any, className?: string }) => <div className={[props.className, "col1"].join(" ")}>{props.children}</div>
const Col2 = (props: { children: any, className?: string }) => <div className={[props.className, "col2"].join(" ")}>{props.children}</div>
Expand Down
10 changes: 0 additions & 10 deletions packages/typescriptlang-org/src/templates/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ const Index: React.FC<Props> = (props) => {
</Row>
</Section>
<VersionBar />
<div style={{
backgroundColor: "#eee",
textAlign: "center",
color: "black",
padding: "0.7rem 2rem",
margin: 0,
fontSize: "0.9rem"
}}>
Welcome to our new website! Find out what's new <a href="https://devblogs.microsoft.com/typescript/announcing-the-new-typescript-website">in the TypeScript Blog</a>
</div>
<Section color="grey" className="hide-small">
<div className="call-to-action">
<Link target="_blank" className='flat-button' to="/play/">{i("index_cta_play")}</Link>
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22571,9 +22571,9 @@ resolve@^1.17.0:
languageName: node
linkType: hard

"root-workspace-0b6124@workspace:.":
"root@workspace:.":
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
resolution: "root@workspace:."
dependencies:
"@types/express": ^4.17.6
concurrently: ^5.1.0
Expand Down