Skip to content

Commit cedd4de

Browse files
Merge branch 'main' into escape-sequence-new
2 parents cb55a08 + 041b0db commit cedd4de

File tree

4,170 files changed

+122104
-1010743
lines changed

Some content is hidden

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

4,170 files changed

+122104
-1010743
lines changed

.eslintrc.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"es6": true
1212
},
1313
"plugins": [
14-
"@typescript-eslint", "no-null", "import", "eslint-plugin-local"
14+
"@typescript-eslint", "no-null", "import", "eslint-plugin-local", "simple-import-sort"
1515
],
1616
"ignorePatterns": [
1717
"**/node_modules/**",
@@ -25,11 +25,8 @@
2525
"/coverage/**"
2626
],
2727
"rules": {
28-
"sort-imports": ["error", {
29-
"ignoreCase": true,
30-
"ignoreDeclarationSort": true,
31-
"allowSeparatedGroups": true
32-
}],
28+
"simple-import-sort/imports": "error",
29+
"simple-import-sort/exports": "error",
3330

3431
"@typescript-eslint/adjacent-overload-signatures": "error",
3532
"@typescript-eslint/array-type": "error",
@@ -180,6 +177,14 @@
180177
{ "name": "exports" }
181178
]
182179
}
180+
},
181+
{
182+
// These files contain imports in a specific order that are generally unsafe to modify.
183+
"files": ["**/_namespaces/**"],
184+
"rules": {
185+
"simple-import-sort/imports": "off",
186+
"simple-import-sort/exports": "off"
187+
}
183188
}
184189
]
185190
}

.github/fabricbot.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{
3232
"name": "addReply",
3333
"parameters": {
34-
"comment": "Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @mjbvz, and @minestarks for you. Feel free to loop in other consumers/maintainers if necessary"
34+
"comment": "Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @mjbvz, @zkat, and @joj for you. Feel free to loop in other consumers/maintainers if necessary"
3535
}
3636
}
3737
],
@@ -487,7 +487,7 @@
487487
{
488488
"name": "addReply",
489489
"parameters": {
490-
"comment": "Thanks for the PR! It looks like you've changed 'preProcess.ts' in some way. Please ensure that any changes here don't break consumers with unique project systems such as Visual Studio. Pinging @sheetalkamat and @minestarks so they are aware of the changes."
490+
"comment": "Thanks for the PR! It looks like you've changed 'preProcess.ts' in some way. Please ensure that any changes here don't break consumers with unique project systems such as Visual Studio. Pinging @sheetalkamat, @zkat, and @joj so they are aware of the changes."
491491
}
492492
}
493493
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
git config user.email "[email protected]"
1717
git config user.name "TypeScript Bot"
1818
npm install
19-
git rm -r --quiet tests/baselines/reference :^tests/baselines/reference/docker :^tests/baselines/reference/user
19+
git rm -r --quiet tests/baselines/reference
2020
npx hereby runtests-parallel --ci --fix || true
2121
npx hereby baseline-accept
2222
git add ./src

.github/workflows/ci.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- run: npm ci
4040

4141
- name: Tests
42-
run: npm run test -- --bundle=${{ matrix.bundle }}
42+
# run tests, but lint separately
43+
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}
4344

4445
lint:
4546
runs-on: ubuntu-latest
@@ -88,13 +89,38 @@ jobs:
8889

8990
smoke:
9091
runs-on: ubuntu-latest
92+
defaults:
93+
run:
94+
working-directory: ./pr
9195

9296
steps:
9397
- uses: actions/checkout@v3
98+
with:
99+
path: pr
100+
101+
- uses: actions/checkout@v3
102+
with:
103+
path: base
104+
ref: ${{ github.base_ref }}
105+
if: github.event_name == 'pull_request'
106+
94107
- uses: actions/setup-node@v3
95108
with:
96109
node-version: "*"
97110
check-latest: true
111+
112+
# Pre-build the base branch so we can check lib folder size changes.
113+
# Note that github.sha points to a merge commit, meaning we're testing
114+
# the base branch versus the base branch with the PR applied.
115+
- name: Build base LKG
116+
if: github.event_name == 'pull_request'
117+
run: |
118+
npm ci
119+
npx hereby lkg
120+
rm -rf $GITHUB_WORKSPACE/pr/lib
121+
mv ./lib $GITHUB_WORKSPACE/pr/
122+
working-directory: ./base
123+
98124
- run: npm ci
99125

100126
- run: npx hereby lkg

.github/workflows/scorecard.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '19 15 * * 4'
14+
push:
15+
branches: [ "main" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
permissions:
25+
# Needed to upload the results to code-scanning dashboard.
26+
security-events: write
27+
# Needed to publish results and get a badge (see publish_results below).
28+
id-token: write
29+
30+
steps:
31+
- name: "Checkout code"
32+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
33+
with:
34+
persist-credentials: false
35+
36+
- name: "Run analysis"
37+
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
38+
with:
39+
results_file: results.sarif
40+
results_format: sarif
41+
42+
# Publish results to OpenSSF REST API for easy access by consumers
43+
# Allows the repository to include the Scorecard badge.
44+
# See https://github.com/ossf/scorecard-action#publishing-results.
45+
publish_results: true
46+
47+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
48+
# format to the repository Actions tab.
49+
- name: "Upload artifact"
50+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
51+
with:
52+
name: SARIF file
53+
path: results.sarif
54+
retention-days: 5
55+
56+
# Upload the results to GitHub's code scanning dashboard.
57+
- name: "Upload to code-scanning"
58+
uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27
59+
with:
60+
sarif_file: results.sarif

.gitignore

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ node_modules/
22
.node_modules/
33
built/*
44
tests/cases/rwc/*
5-
tests/cases/test262/*
65
tests/cases/perf/*
76
!tests/cases/webharness/compilerToString.js
87
test-args.txt
@@ -14,7 +13,6 @@ tests/baselines/local.old/*
1413
tests/services/baselines/local/*
1514
tests/baselines/prototyping/local/*
1615
tests/baselines/rwc/*
17-
tests/baselines/test262/*
1816
tests/baselines/reference/projectOutput/*
1917
tests/baselines/local/projectOutput/*
2018
tests/baselines/reference/testresults.tap
@@ -34,7 +32,6 @@ tests/webTestServer.js.map
3432
tests/webhost/*.d.ts
3533
tests/webhost/webtsc.js
3634
tests/cases/**/*.js
37-
!tests/cases/docker/*.js/
3835
tests/cases/**/*.js.map
3936
*.config
4037
scripts/eslint/built/
@@ -59,29 +56,10 @@ internal/
5956
yarn.lock
6057
yarn-error.log
6158
.parallelperf.*
62-
tests/cases/user/*/package-lock.json
63-
tests/cases/user/*/node_modules/
64-
tests/cases/user/*/**/*.js
65-
tests/cases/user/*/**/*.js.map
66-
tests/cases/user/*/**/*.d.ts
67-
!tests/cases/user/zone.js/
68-
!tests/cases/user/bignumber.js/
69-
!tests/cases/user/discord.js/
7059
tests/baselines/reference/dt
7160
.failed-tests
7261
TEST-results.xml
7362
package-lock.json
74-
tests/cases/user/npm/npm
75-
tests/cases/user/TypeScript-React-Starter/TypeScript-React-Starter
76-
tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter
77-
tests/cases/user/TypeScript-React-Native-Starter/TypeScript-React-Native-Starter
78-
tests/cases/user/TypeScript-Vue-Starter/TypeScript-Vue-Starter
79-
tests/cases/user/TypeScript-WeChat-Starter/TypeScript-WeChat-Starter
80-
tests/cases/user/create-react-app/create-react-app
81-
tests/cases/user/fp-ts/fp-ts
82-
tests/cases/user/webpack/webpack
83-
tests/cases/user/puppeteer/puppeteer
84-
tests/cases/user/axios-src/axios-src
85-
tests/cases/user/prettier/prettier
8663
.eslintcache
87-
*v8.log
64+
*v8.log
65+
lib/

.vscode/launch.template.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
"env": {
4141
"NODE_ENV": "testing"
4242
},
43+
"outFiles": [
44+
"${workspaceFolder}/built/**/*.js",
45+
"${workspaceFolder}/built/**/*.mjs",
46+
"${workspaceFolder}/built/**/*.cjs",
47+
"!**/node_modules/**"
48+
],
4349
"sourceMaps": true,
4450
"smartStep": true,
4551
"preLaunchTask": "npm: build:tests",

.vscode/settings.template.json

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
// Rename this file 'settings.json' or merge its
22
// contents into your existing settings.
33
{
4-
// To use the last-known-good (LKG) compiler version:
5-
// "typescript.tsdk": "lib"
6-
74
// To use the locally built compiler, after 'npm run build':
85
// "typescript.tsdk": "built/local"
96

107
// To ignore commits listed in .git-blame-ignore-revs in GitLens:
11-
// "gitlens.advanced.blame.customArguments": [
12-
// "--ignore-revs-file",
13-
// ".git-blame-ignore-revs"
14-
// ]
8+
"gitlens.advanced.blame.customArguments": [
9+
"--ignore-revs-file",
10+
".git-blame-ignore-revs"
11+
],
12+
13+
// Match eslint-plugin-simple-import-sort in organize/auto-imports.
14+
"typescript.unstable": {
15+
"organizeImportsCollation": "unicode",
16+
"organizeImportsCaseFirst": "upper",
17+
"organizeImportsIgnoreCase": false,
18+
"organizeImportsNumericCollation": true
19+
},
20+
"javascript.unstable": {
21+
"organizeImportsCollation": "unicode",
22+
"organizeImportsCaseFirst": "upper",
23+
"organizeImportsIgnoreCase": false,
24+
"organizeImportsNumericCollation": true
25+
},
1526

1627
// These options search the repo recursively and slow down
1728
// the build task menu. We define our own in tasks.json.

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"label": "tsc: watch ./src",
2626
"type": "shell",
2727
"command": "node",
28-
"args": ["${workspaceFolder}/lib/tsc.js", "--build", "${workspaceFolder}/src", "--watch"],
28+
"args": ["${workspaceFolder}/node_modules/typescript/lib/tsc.js", "--build", "${workspaceFolder}/src", "--watch"],
2929
"group": "build",
3030
"isBackground": true,
3131
"problemMatcher": [

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ hereby tests # Build the test infrastructure using the built compile
8181
hereby runtests # Run tests using the built compiler and test infrastructure.
8282
# You can override the specific suite runner used or specify a test for this command.
8383
# Use --tests=<testPath> for a specific test and/or --runner=<runnerName> for a specific suite.
84-
# Valid runners include conformance, compiler, fourslash, project, user, and docker
85-
# The user and docker runners are extended test suite runners - the user runner
86-
# works on disk in the tests/cases/user directory, while the docker runner works in containers.
87-
# You'll need to have the docker executable in your system path for the docker runner to work.
84+
# Valid runners include conformance, compiler, fourslash, and project
8885
hereby runtests-parallel # Like runtests, but split across multiple threads. Uses a number of threads equal to the system
8986
# core count by default. Use --workers=<number> to adjust this.
9087
hereby baseline-accept # This replaces the baseline test results with the results obtained from hereby runtests.

0 commit comments

Comments
 (0)