Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(compat): fix building TypeScript patches #6186

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Mar 27, 2024

What's the problem this PR addresses?

Depending on the version of Node.js and npm you have available; building the TypeScript patches might not work.

How did you fix it?

  • Since "recent" versions of TypeScript have a Volta config specifying the Node.js and npm versions to use, change the script to always use Volta to run node and npm.
  • For older versions without a complete Volta config I've added one.
  • Install using npm ci when a lockfile is present as using npm install causes some TypeScript builds to fail.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit 17de52a into master Apr 10, 2024
22 of 26 checks passed
@arcanis arcanis deleted the merceyz/build/ts-patches branch April 10, 2024 10:41
arcanis pushed a commit that referenced this pull request Apr 10, 2024
**What's the problem this PR addresses?**

Building the latest TypeScript patch requires fetching
https://github.com/arcanis/typescript,
https://github.com/microsoft/typescript, and
https://github.com/merceyz/typescript which, according to git, requires
fetching 1.87 GiB, 452 MiB, and 42 MiB of data and produces a 2.7GB
`.git` folder.

**How did you fix it?**

Fork TypeScript to https://github.com/yarnpkg/TypeScript and push the
branches required to build all the patches to it and change the script
to use a treeless clone of it which only needs to fetch 55 MiB of data
and produces a 74MB `.git` folder.

Depends on 
- #6186

**Checklist**
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
merceyz added a commit that referenced this pull request May 2, 2024
**What's the problem this PR addresses?**

Depending on the version of Node.js and npm you have available; building
the TypeScript patches might not work.

**How did you fix it?**

- Since "recent" versions of TypeScript have a Volta config specifying
the Node.js and npm versions to use, change the script to always use
Volta to run `node` and `npm`.
- For older versions without a complete Volta config I've added one.
- Install using `npm ci` when a lockfile is present as using `npm
install` causes some TypeScript builds to fail.

**Checklist**
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
merceyz added a commit that referenced this pull request May 2, 2024
**What's the problem this PR addresses?**

Building the latest TypeScript patch requires fetching
https://github.com/arcanis/typescript,
https://github.com/microsoft/typescript, and
https://github.com/merceyz/typescript which, according to git, requires
fetching 1.87 GiB, 452 MiB, and 42 MiB of data and produces a 2.7GB
`.git` folder.

**How did you fix it?**

Fork TypeScript to https://github.com/yarnpkg/TypeScript and push the
branches required to build all the patches to it and change the script
to use a treeless clone of it which only needs to fetch 55 MiB of data
and produces a 74MB `.git` folder.

Depends on 
- #6186

**Checklist**
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants