-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
BREAKING CHANGE: es6 module (vs es5) and typescript 3 -> 5
@@ -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 |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi @polomani
_.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; |
There was a problem hiding this comment.
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
There was a problem hiding this 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!
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 branchrelease-v10
(protected), and this PR is against that branch.We have configured this branch to publish release candidates to npm.