From 2537f110d3e05a5759f8caeeaa48474da5101cf7 Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Thu, 9 Oct 2025 18:34:28 -0700 Subject: [PATCH 1/9] workflow --- .github/workflows/auto-merge-upstream.yml | 54 +++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/auto-merge-upstream.yml diff --git a/.github/workflows/auto-merge-upstream.yml b/.github/workflows/auto-merge-upstream.yml new file mode 100644 index 0000000000000..9af6a601e1398 --- /dev/null +++ b/.github/workflows/auto-merge-upstream.yml @@ -0,0 +1,54 @@ +name: Auto Merge Upstream and Publish + +on: + schedule: + - cron: '0 3 * * *' + workflow_dispatch: + +jobs: + merge-build-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Add upstream remote + run: git remote add upstream https://github.com/microsoft/TypeScript.git + + - name: Fetch upstream + run: git fetch upstream + + - name: Merge upstream/main + run: git merge upstream/main + + - name: Push changes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: git push origin HEAD:operators + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run LKG build + run: npx hereby LKG + + - name: Publish to npm + if: success() # Only publish if the previous steps were successful + run: | + npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} + npm publish --access public \ No newline at end of file From d92a47078d1c1445054499053d11ed9070384df0 Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Thu, 9 Oct 2025 18:58:16 -0700 Subject: [PATCH 2/9] workflow --- .github/workflows/auto-merge-upstream.yml | 37 ++++++++++++++++------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-merge-upstream.yml b/.github/workflows/auto-merge-upstream.yml index 9af6a601e1398..c4d1ce50f37bd 100644 --- a/.github/workflows/auto-merge-upstream.yml +++ b/.github/workflows/auto-merge-upstream.yml @@ -1,9 +1,10 @@ -name: Auto Merge Upstream and Publish + +name: Auto Merge Upstream and Publish Operators on: + workflow_dispatch: schedule: - cron: '0 3 * * *' - workflow_dispatch: jobs: merge-build-publish: @@ -13,26 +14,38 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + fetch-depth: 0 - - name: Set up git + - name: Set up git and fetch branches run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + git remote add upstream https://github.com/microsoft/TypeScript.git || true + git fetch upstream + git fetch origin operators - - name: Add upstream remote - run: git remote add upstream https://github.com/microsoft/TypeScript.git + - name: Merge upstream/main into main + run: | + git checkout main + git merge upstream/main - - name: Fetch upstream - run: git fetch upstream + - name: Push merged changes to main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: git push origin HEAD:main - - name: Merge upstream/main - run: git merge upstream/main + - name: Merge operators into main + run: | + git merge origin/operators - - name: Push changes + - name: Push merged changes to operators env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: git push origin HEAD:operators + - name: Checkout operators branch + run: git checkout operators + - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -48,7 +61,9 @@ jobs: run: npx hereby LKG - name: Publish to npm - if: success() # Only publish if the previous steps were successful + if: success() + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} npm publish --access public \ No newline at end of file From 52a72bd60a2ab04e6be315c18307a47359717dd2 Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Thu, 9 Oct 2025 19:15:41 -0700 Subject: [PATCH 3/9] workflow --- .github/workflows/auto-merge-upstream.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-merge-upstream.yml b/.github/workflows/auto-merge-upstream.yml index c4d1ce50f37bd..11a32579be42e 100644 --- a/.github/workflows/auto-merge-upstream.yml +++ b/.github/workflows/auto-merge-upstream.yml @@ -30,18 +30,13 @@ jobs: git merge upstream/main - name: Push merged changes to main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: git push origin HEAD:main - + run: git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adrianstephens/TypeScript.git HEAD:main + - name: Merge operators into main - run: | - git merge origin/operators + run: git merge origin/operators - name: Push merged changes to operators - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: git push origin HEAD:operators + run: git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adrianstephens/TypeScript.git HEAD:operators - name: Checkout operators branch run: git checkout operators @@ -62,8 +57,6 @@ jobs: - name: Publish to npm if: success() - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} npm publish --access public \ No newline at end of file From 9801b4f47046523c1657c675c7b6fcaa836caeb0 Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Fri, 10 Oct 2025 10:51:06 -0700 Subject: [PATCH 4/9] package --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ad629ace064c5..953f0b40884e3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "typescript", + "name": "@isopodlabs/typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", "version": "6.0.0", @@ -13,11 +13,11 @@ "javascript" ], "bugs": { - "url": "https://github.com/microsoft/TypeScript/issues" + "url": "https://github.com/adrianstephens/TypeScript/issues" }, "repository": { "type": "git", - "url": "https://github.com/microsoft/TypeScript.git" + "url": "https://github.com/adrianstephens/TypeScript.git" }, "main": "./lib/typescript.js", "typings": "./lib/typescript.d.ts", From 77c1aa4e11f6e42191064102e8f8d1de6346eccb Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Fri, 10 Oct 2025 11:04:28 -0700 Subject: [PATCH 5/9] format --- .github/workflows/auto-merge-upstream.yml | 123 +++++++++++----------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/.github/workflows/auto-merge-upstream.yml b/.github/workflows/auto-merge-upstream.yml index 11a32579be42e..c6d8e6d4c1763 100644 --- a/.github/workflows/auto-merge-upstream.yml +++ b/.github/workflows/auto-merge-upstream.yml @@ -1,62 +1,61 @@ - -name: Auto Merge Upstream and Publish Operators - -on: - workflow_dispatch: - schedule: - - cron: '0 3 * * *' - -jobs: - merge-build-publish: - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - with: - persist-credentials: false - fetch-depth: 0 - - - name: Set up git and fetch branches - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git remote add upstream https://github.com/microsoft/TypeScript.git || true - git fetch upstream - git fetch origin operators - - - name: Merge upstream/main into main - run: | - git checkout main - git merge upstream/main - - - name: Push merged changes to main - run: git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adrianstephens/TypeScript.git HEAD:main - - - name: Merge operators into main - run: git merge origin/operators - - - name: Push merged changes to operators - run: git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adrianstephens/TypeScript.git HEAD:operators - - - name: Checkout operators branch - run: git checkout operators - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Run LKG build - run: npx hereby LKG - - - name: Publish to npm - if: success() - run: | - npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} - npm publish --access public \ No newline at end of file +name: Auto Merge Upstream and Publish Operators + +on: + workflow_dispatch: + schedule: + - cron: '0 3 * * *' + +jobs: + merge-build-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Set up git and fetch branches + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git remote add upstream https://github.com/microsoft/TypeScript.git || true + git fetch upstream + git fetch origin operators + + - name: Merge upstream/main into main + run: | + git checkout main + git merge upstream/main + + - name: Push merged changes to main + run: git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adrianstephens/TypeScript.git HEAD:main + + - name: Merge operators into main + run: git merge origin/operators + + - name: Push merged changes to operators + run: git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adrianstephens/TypeScript.git HEAD:operators + + - name: Checkout operators branch + run: git checkout operators + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run LKG build + run: npx hereby LKG + + - name: Publish to npm + if: success() + run: | + npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} + npm publish --access public From 223c045427d47ca699fe1d69fbcaa64a974594ba Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Fri, 10 Oct 2025 11:10:30 -0700 Subject: [PATCH 6/9] smoke test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ca8c3ba11cb8..dd2aa921c438e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -267,7 +267,7 @@ jobs: - run: | node ./scripts/addPackageJsonGitHead.mjs package.json npm pack - mv typescript*.tgz typescript.tgz + mv *.tgz typescript.tgz echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT" id: pack From f0ebb3d9f11ffba2039b0e0b2d77f9d42102bf35 Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Fri, 10 Oct 2025 12:12:46 -0700 Subject: [PATCH 7/9] package --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 953f0b40884e3..1762d53cddcb5 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/adrianstephens/TypeScript.git" + "url": "git+https://github.com/adrianstephens/TypeScript.git" }, "main": "./lib/typescript.js", "typings": "./lib/typescript.d.ts", "bin": { - "tsc": "./bin/tsc", - "tsserver": "./bin/tsserver" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" From 74ae414fc4def62df96e7b0f51cc79b8ffaa1115 Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Fri, 10 Oct 2025 12:13:48 -0700 Subject: [PATCH 8/9] package --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 953f0b40884e3..1762d53cddcb5 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/adrianstephens/TypeScript.git" + "url": "git+https://github.com/adrianstephens/TypeScript.git" }, "main": "./lib/typescript.js", "typings": "./lib/typescript.d.ts", "bin": { - "tsc": "./bin/tsc", - "tsserver": "./bin/tsserver" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { "node": ">=14.17" From 78778ae6aa84f95cc0259b5a1a3189f27273567c Mon Sep 17 00:00:00 2001 From: adrianstephens Date: Fri, 10 Oct 2025 12:42:52 -0700 Subject: [PATCH 9/9] smoke test --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd2aa921c438e..8680418c080bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -283,8 +283,9 @@ jobs: echo "Testing tsserver..." echo '{"seq": 1, "command": "status"}' | npx tsserver - node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript - node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript/lib/tsserverlibrary + PKG_NAME=$(jq -r .name < "$GITHUB_WORKSPACE/package.json") + node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs "$PKG_NAME" + node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs "$PKG_NAME/lib/tsserverlibrary" package-size: runs-on: ubuntu-latest