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

chore: upgrade to typescript 5 #1135

Merged
merged 3 commits into from
Aug 26, 2024
Merged

chore: upgrade to typescript 5 #1135

merged 3 commits into from
Aug 26, 2024

Conversation

BugGambit
Copy link
Contributor

@BugGambit BugGambit commented Aug 22, 2024

This PR upgrades to Typescript 5 from 3, and resolve breaking changes.
We also replace Rollup with Vite and change the SDKs from es5 compatibility to become es6 modules.

We are not merging this into master as we would like to bulk up multiple breaking changes before the final release. We, therefore, use the target branch release-v10 (protected), and this PR is against that branch.

We have configured this branch to publish release candidates to npm.

BREAKING CHANGE: es6 module (vs es5) and typescript 3 -> 5
@BugGambit BugGambit changed the base branch from master to release-v10 August 22, 2024 10:26
@@ -85,7 +85,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_LERNA_TOKEN }} # Temporary fix to make lerna able to push the new versions commit to master
GITHUB_TOKEN: ${{ secrets.GH_LERNA_TOKEN }} # Temporary fix to make lerna able to push the new versions commit to master
run: yarn lerna version --conventional-commits --create-release github --no-private --yes
run: yarn lerna version --conventional-commits --conventional-prerelease --preid rc --create-release github --no-private --yes
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this major release, we start with releasing release candidates (rc)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @polomani

Comment on lines +13 to +34
_.cloneDeepWith(jsDoc, (value, key, object) => {
if (key !== 'summary') {
return;
}
if (!Array.isArray(value) || value.length === 0) {
return;
}
if (value[0].kind !== 'text') {
return;
}
const docRegEx =
/https:\/\/(doc\.cognitedata\.com|docs\.cognite\.com|developer\.cognite\.com)\/api.*operation\/([a-zA-Z0-9]+)/g;
let matches;
while (true) {
matches = docRegEx.exec(value);
if (!matches) {
break;
const matches = value[0].text.matchAll(docRegEx);
for (const match of matches) {
const operationId = match[2];
if (value.length !== 2) {
throw new Error('Unexpected length of summary');
}
if (value[1].kind !== 'code') {
throw new Error(`Expected code snippet, but got ${value[1].kind}`);
}
const operationId = matches[2];
const rawCode = object.text;
const rawCode = value[1].text;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typedoc output format has changed in the recent version

@BugGambit BugGambit marked this pull request as ready for review August 22, 2024 10:32
@BugGambit BugGambit requested review from andersfylling and a team as code owners August 22, 2024 10:32
Copy link
Contributor

@anjalirai2626 anjalirai2626 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there isn't any change in logic and mostly config 👍

More eyes are welcome if needed!

@BugGambit BugGambit merged commit 1530809 into release-v10 Aug 26, 2024
9 checks passed
@BugGambit BugGambit deleted the typescript5 branch August 26, 2024 11:35
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