Skip to content

Commit eabc012

Browse files
committed
Merge branch 'main' into fix-deprecations
2 parents f371366 + 6a39f91 commit eabc012

File tree

1,451 files changed

+69529
-230893
lines changed

Some content is hidden

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

1,451 files changed

+69529
-230893
lines changed

.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: 2 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

.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: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ tests/webTestServer.js.map
3434
tests/webhost/*.d.ts
3535
tests/webhost/webtsc.js
3636
tests/cases/**/*.js
37-
!tests/cases/docker/*.js/
3837
tests/cases/**/*.js.map
3938
*.config
4039
scripts/eslint/built/
@@ -59,29 +58,9 @@ internal/
5958
yarn.lock
6059
yarn-error.log
6160
.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/
7061
tests/baselines/reference/dt
7162
.failed-tests
7263
TEST-results.xml
7364
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
8665
.eslintcache
87-
*v8.log
66+
*v8.log

.vscode/settings.template.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
// "typescript.tsdk": "built/local"
99

1010
// 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-
// ]
11+
"gitlens.advanced.blame.customArguments": [
12+
"--ignore-revs-file",
13+
".git-blame-ignore-revs"
14+
],
1515

1616
// Match eslint-plugin-simple-import-sort in organize/auto-imports.
1717
"typescript.unstable": {
@@ -20,6 +20,12 @@
2020
"organizeImportsIgnoreCase": false,
2121
"organizeImportsNumericCollation": true
2222
},
23+
"javascript.unstable": {
24+
"organizeImportsCollation": "unicode",
25+
"organizeImportsCaseFirst": "upper",
26+
"organizeImportsIgnoreCase": false,
27+
"organizeImportsNumericCollation": true
28+
},
2329

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

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.

Herebyfile.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,19 @@ export const runTestsAndWatch = task({
702702
},
703703
});
704704

705-
export const runTestsParallel = task({
706-
name: "runtests-parallel",
705+
const doRunTestsParallel = task({
706+
name: "do-runtests-parallel",
707707
description: "Runs all the tests in parallel using the built run.js file.",
708708
dependencies: runtestsDeps,
709709
run: () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1),
710710
});
711+
712+
export const runTestsParallel = task({
713+
name: "runtests-parallel",
714+
description: "Runs all the tests in parallel using the built run.js file, linting in parallel if --lint=true.",
715+
dependencies: [doRunTestsParallel].concat(cmdLineOptions.lint ? [lint] : []),
716+
});
717+
711718
// task("runtests-parallel").flags = {
712719
// " --light": "Run tests in light mode (fewer verifications, but tests run faster).",
713720
// " --keepFailed": "Keep tests in .failed-tests even if they pass.",

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
[![Devops Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build?definitionId=7)
66
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
77
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
8+
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript)
9+
810

911
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
1012

0 commit comments

Comments
 (0)