Skip to content

Commit f6840d5

Browse files
committed
Merge branch 'main' into fix/51138
# Conflicts: # src/compiler/checker.ts
2 parents 3bdd860 + 1d96eb4 commit f6840d5

File tree

2,404 files changed

+346969
-293722
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,404 files changed

+346969
-293722
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
ARG VARIANT="14-buster"
55
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
66

7-
RUN sudo -u node npm install -g gulp-cli
7+
RUN sudo -u node npm install -g hereby

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
**/node_modules/**
2-
/built/local/**
2+
/built/**
33
/tests/**
44
/lib/**
55
/src/lib/*.generated.d.ts

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"local/simple-indent": "error",
8888
"local/debug-assert": "error",
8989
"local/no-keywords": "error",
90-
"local/one-namespace-per-file": "error",
90+
"local/jsdoc-format": "error",
9191

9292
// eslint-plugin-import
9393
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],

.git-blame-ignore-revs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Generated module conversion step - inlineImports
2+
07758c08ab72481885e662c98d67a0e3a071b032
3+
# Generated module conversion step - stripNamespaces
4+
b6c053882696af8ddd94a600429f30584d303d7f
5+
# Generated module conversion step - explicitify
6+
9a0b85ce2a3f85f498ab2c05474b4c0b96b111c9
7+
# Generated module conversion step - unindent
8+
94724a8c2e68a4c7e267072ca79971f317c45e4a
Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
11
name : CodeQL Configuration
22

33
paths:
4-
- './src'
4+
- src
5+
- scripts
6+
- Gulpfile.mjs
7+
paths-ignore:
8+
- src/lib
9+
10+
# These queries appear to time out after the module conversion.
11+
# https://github.com/github/codeql/issues/10937
12+
query-filters:
13+
- exclude:
14+
id: js/path-injection # TaintedPath.ql
15+
- exclude:
16+
id: js/command-line-injection # CommandInjection.ql
17+
- exclude:
18+
id: js/code-injection # CodeInjection.ql
19+
- exclude:
20+
id: js/bad-code-sanitization # ImproperCodeSanitization.ql
21+
- exclude:
22+
id: js/unsafe-dynamic-method-access # UnsafeDynamicMethodAccess.ql
23+
- exclude:
24+
id: js/clear-text-logging # CleartextLogging.ql
25+
- exclude:
26+
id: js/regex-injection # RegExpInjection.ql
27+
- exclude:
28+
id: js/unvalidated-dynamic-method-call # UnvalidatedDynamicMethodCall.ql
29+
- exclude:
30+
id: js/insecure-download # InsecureDownload.ql
31+
- exclude:
32+
id: js/prototype-polluting-assignment # PrototypePollutingAssignment.ql
33+
- exclude:
34+
id: js/request-forgery # RequestForgery.ql

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Thank you for submitting a pull request!
44
Please verify that:
55
* [ ] There is an associated issue in the `Backlog` milestone (**required**)
66
* [ ] Code is up-to-date with the `main` branch
7-
* [ ] You've successfully run `gulp runtests` locally
7+
* [ ] You've successfully run `hereby runtests` locally
88
* [ ] There are new or updated unit tests validating the change
99
1010
Refer to CONTRIBUTING.MD for more details.

.github/workflows/accept-baselines-fix-lints.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
git config user.name "TypeScript Bot"
1818
npm install
1919
git rm -r --quiet tests/baselines/reference :^tests/baselines/reference/docker :^tests/baselines/reference/user
20-
gulp runtests-parallel --ci --fix || true
21-
gulp baseline-accept
20+
npx hereby runtests-parallel --ci --fix || true
21+
npx hereby baseline-accept
2222
git add ./src
2323
git add ./tests/baselines/reference
2424
git diff --cached

.github/workflows/ci.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ jobs:
2121
- "*"
2222
- lts/*
2323
- lts/-1
24+
bundle:
25+
- "true"
26+
include:
27+
- node-version: "*"
28+
bundle: "false"
29+
30+
name: Test Node ${{ matrix.node-version }} with --bundle=${{ matrix.bundle }}
2431

2532
steps:
2633
- uses: actions/checkout@v3
@@ -32,7 +39,7 @@ jobs:
3239
- run: npm ci
3340

3441
- name: Tests
35-
run: npm test
42+
run: npm run test -- --bundle=${{ matrix.bundle }}
3643

3744
lint:
3845
runs-on: ubuntu-latest
@@ -62,11 +69,23 @@ jobs:
6269
- name: Adding playwright
6370
run: npm install --no-save --no-package-lock playwright
6471

65-
- name: Build local
66-
run: gulp local
67-
6872
- name: Validate the browser can import TypeScript
69-
run: gulp test-browser-integration
73+
run: npx hereby test-browser-integration
74+
75+
typecheck:
76+
runs-on: ubuntu-latest
77+
78+
steps:
79+
- uses: actions/checkout@v3
80+
- uses: actions/setup-node@v3
81+
with:
82+
node-version: "*"
83+
check-latest: true
84+
- run: npm ci
85+
86+
- name: Build src
87+
run: npx hereby build-src
88+
7089

7190
misc:
7291
runs-on: ubuntu-latest
@@ -80,7 +99,27 @@ jobs:
8099
- run: npm ci
81100

82101
- name: Build scripts
83-
run: gulp scripts
102+
run: npx hereby scripts
84103

85104
- name: ESLint tests
86-
run: gulp run-eslint-rules-tests
105+
run: npx hereby run-eslint-rules-tests
106+
107+
self-check:
108+
runs-on: ubuntu-latest
109+
110+
steps:
111+
- uses: actions/checkout@v3
112+
- uses: actions/setup-node@v3
113+
with:
114+
node-version: "*"
115+
check-latest: true
116+
- run: npm ci
117+
118+
- name: Build tsc
119+
run: npx hereby tsc
120+
121+
- name: Clean
122+
run: npx hereby clean-src
123+
124+
- name: Self build
125+
run: npx hereby build-src --built

.github/workflows/codeql.yml

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,64 @@
1-
name: "Code scanning - action"
1+
name: "Code Scanning - Action"
22

33
on:
44
push:
5+
branches:
6+
- main
7+
- release-*
58
pull_request:
9+
branches:
10+
- main
11+
- release-*
612
schedule:
7-
- cron: '0 19 * * 0'
13+
# ┌───────────── minute (0 - 59)
14+
# │ ┌───────────── hour (0 - 23)
15+
# │ │ ┌───────────── day of the month (1 - 31)
16+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
17+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
18+
# │ │ │ │ │
19+
# │ │ │ │ │
20+
# │ │ │ │ │
21+
# * * * * *
22+
- cron: '30 1 * * 0'
823

924
jobs:
1025
CodeQL-Build:
11-
12-
# CodeQL runs on ubuntu-latest and windows-latest
26+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
1327
runs-on: ubuntu-latest
1428
if: github.repository == 'microsoft/TypeScript'
1529

30+
permissions:
31+
# required for all workflows
32+
security-events: write
33+
1634
steps:
17-
- name: Checkout repository
18-
uses: actions/checkout@v3
19-
with:
20-
# We must fetch at least the immediate parents so that if this is
21-
# a pull request then we can checkout the head.
22-
fetch-depth: 2
23-
24-
# Initializes the CodeQL tools for scanning.
25-
- name: Initialize CodeQL
26-
uses: github/codeql-action/init@v2
27-
with:
28-
config-file: ./.github/codeql/codeql-configuration.yml
29-
# Override language selection by uncommenting this and choosing your languages
30-
# with:
31-
# languages: go, javascript, csharp, python, cpp, java
32-
33-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
34-
# If this step fails, then you should remove it and run the build manually (see below)
35-
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v2
37-
38-
# ℹ️ Command-line programs to run using the OS shell.
39-
# 📚 https://git.io/JvXDl
40-
41-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
42-
# and modify them (or add more) to build your code if your project
43-
# uses a compiled language
44-
45-
#- run: |
46-
# make bootstrap
47-
# make release
48-
49-
- name: Perform CodeQL Analysis
50-
uses: github/codeql-action/analyze@v2
35+
- name: Checkout repository
36+
uses: actions/checkout@v3
37+
38+
# Initializes the CodeQL tools for scanning.
39+
- name: Initialize CodeQL
40+
uses: github/codeql-action/init@v2
41+
with:
42+
config-file: ./.github/codeql/codeql-configuration.yml
43+
# Override language selection by uncommenting this and choosing your languages
44+
# with:
45+
# languages: go, javascript, csharp, python, cpp, java
46+
47+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
48+
# If this step fails, then you should remove it and run the build manually (see below).
49+
- name: Autobuild
50+
uses: github/codeql-action/autobuild@v2
51+
52+
# ℹ️ Command-line programs to run using the OS shell.
53+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
54+
55+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
56+
# three lines and modify them (or add more) to build your code if your
57+
# project uses a compiled language
58+
59+
#- run: |
60+
# make bootstrap
61+
# make release
62+
63+
- name: Perform CodeQL Analysis
64+
uses: github/codeql-action/analyze@v2
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "typescript-error-deltas Watchdog"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * 3' # Every Wednesday
7+
8+
jobs:
9+
check-for-recent:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'microsoft/TypeScript'
12+
permissions:
13+
contents: read # Apparently required to create issues
14+
issues: write
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
TAGS: "@navya9singh @RyanCavanaugh @DanielRosenwasser"
18+
steps:
19+
- name: NewErrors
20+
run: | # --json and --jq prints exactly one issue number per line of output
21+
DATE=$(date --date="7 days ago" --iso-8601)
22+
gh issue list --repo microsoft/typescript --search "[NewErrors] created:>=$DATE" --state all --json number --jq ".[].number" \
23+
| grep -qe "[0-9]" \
24+
|| gh issue create --repo ${{ github.repository }} --title "No NewErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=48)."
25+
- name: ServerErrors TS
26+
run: |
27+
DATE=$(date --date="7 days ago" --iso-8601)
28+
gh issue list --repo microsoft/typescript --search "[ServerErrors][TypeScript] created:>=$DATE" --state all --json number --jq ".[].number" \
29+
| grep -qe "[0-9]" \
30+
|| gh issue create --repo ${{ github.repository }} --title "No TypeScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=59)."
31+
- name: ServerErrors JS
32+
run: |
33+
DATE=$(date --date="7 days ago" --iso-8601)
34+
gh issue list --repo microsoft/typescript --search "[ServerErrors][JavaScript] created:>=$DATE" --state all --json number --jq ".[].number" \
35+
| grep -qe "[0-9]" \
36+
|| gh issue create --repo ${{ github.repository }} --title "No JavaScript ServerErrors issue since $DATE" --body "$TAGS Please check the [pipeline](https://typescript.visualstudio.com/TypeScript/_build?definitionId=58)."

0 commit comments

Comments
 (0)