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: update typescript to 4.6.3 #5788

Merged
merged 6 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .github/workflows/ci-validate-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ jobs:
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo '::set-output name=dir::$(yarn cache dir)'

- name: Set up node_modules cache
uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install package dependencies
run: yarn install --frozen-lockfile --ignore-scripts --network-timeout=360000 --prefer-offline

Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/ci-validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@ jobs:
with:
fetch-depth: 0

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo '::set-output name=dir::$(yarn cache dir)'

- name: Set up node_modules cache
uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install package dependencies
run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/eslint-config-fast-dna",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-animation",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-colors",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-components",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-element",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-foundation",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-react-wrapper",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-router",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "update to typescript 4.6.2 and update ARIAMixin typings",
"packageName": "@microsoft/fast-web-utilities",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion examples/design-system-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"rimraf": "^3.0.2",
"ts-loader": "^7.0.1",
"typescript": "^3.8.3",
"typescript": "^4.6.2",
"webpack": "^4.44.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/todo-app-tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"http-server": "^14.1.0",
"rimraf": "^3.0.2",
"ts-loader": "^7.0.1",
"typescript": "^3.8.3",
"typescript": "^4.6.2",
"webpack": "^4.44.0",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.11.0"
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@
]
},
"resolutions": {
"@types/react": "*",
"@microsoft/fast-tooling": "^0.37.7",
"@types/react": "^16.14.0",
"browserslist": "^4.16.5",
"clean-css": "^4.2.3",
"css-select": "^4.2.1",
Expand All @@ -134,7 +135,7 @@
"node-notifier": "^9.0.0",
"trim-newlines": "^4.0.2",
"trim": "^0.0.3",
"typescript": "^3.9.0",
"typescript": "^4.6.2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This resolution forces all typescript dependencies to match. Is it still needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm attempting to push forward with parity in order to keep this change as minimally disruptive as possible. My concern is that we end up with unexpected outcomes by removing this in this PR. This and it's existence as a dependency is a solid question and deserving of it's own issue IMO.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to take this in a separate PR, my assumption is that it is needed due to the breaking changes within minor versions. We'll need to investigate in full though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OH api-extractor uses its own version of Typescript without this. We don't want that.

"ua-parser-js": "^0.7.28",
"ws": "^7.4.6",
"xmlhttprequest-ssl": "^1.6.2"
Expand Down Expand Up @@ -162,7 +163,7 @@
"rimraf": "^3.0.2",
"ts-jest": "^25.4.0",
"ts-node": "^8.8.2",
"typescript": "^3.9.0",
"typescript": "^4.6.2",
radium-v marked this conversation as resolved.
Show resolved Hide resolved
"yargs": "^16.2.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tooling/fast-figma-plugin-msft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-dom": "^16.12.0",
"style-loader": "^1.1.2",
"ts-loader": "^6.2.1",
"typescript": "^3.9.0",
"typescript": "^4.6.2",
"webpack": "^4.44.0",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10"
Expand Down
13 changes: 7 additions & 6 deletions packages/utilities/fast-animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@
"coverageThreshold": {
"global": {
"statements": 72,
"branches": 57,
"branches": 56,
"functions": 67,
"lines": 72
}
},
"rootDir": "./",
"testEnvironment": "jsdom",
"transform": {
".(ts|tsx)": "ts-jest"
},
Expand All @@ -71,12 +72,11 @@
"@babel/preset-react": "^7.12.13",
"@microsoft/api-extractor": "7.8.1",
"@microsoft/eslint-config-fast-dna": "^2.0.0",
"@types/jest": "^25.2.1",
"@types/jest": "^27.0.0",
"@types/node": "^15.0.1",
"@types/react": "^16.3.0",
"@types/react-dom": "^16.3.0",
"@types/react-redux": "^4.4.47",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.2.2",
"css-loader": "^5.2.6",
"eslint": "^6.8.0",
Expand All @@ -85,7 +85,7 @@
"file-loader": "^3.0.1",
"fork-ts-checker-webpack-plugin": "^0.4.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^25.4.0",
"jest": "^27.0.0",
"mini-css-extract-plugin": "^1.6.1",
"postcss": "^8.3.5",
"postcss-loader": "^4.2.0",
Expand All @@ -95,8 +95,9 @@
"react-router": "^4.1.1",
"require-dir": "^0.3.2",
"style-loader": "^0.13.2",
"ts-jest": "^25.4.0",
"typescript": "^3.9.0",
"ts-jest": "^27.0.0",
"ts-loader": "^8.0.0",
"typescript": "^4.6.2",
"webpack": "^4.44.0",
"webpack-bundle-analyzer": "^3.5.2",
"webpack-cli": "^3.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/fast-animation/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
]
}
}
}
}
2 changes: 1 addition & 1 deletion packages/utilities/fast-animation/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = (env, args) => {
exclude: /\.(test|spec)/,
use: [
{ loader: "babel-loader" },
{ loader: "awesome-typescript-loader" },
{ loader: "ts-loader" },
{ loader: "eslint-loader" },
],
},
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/fast-benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"html-webpack-plugin": "^5.3.1",
"prettier": "2.0.2",
"ts-loader": "^8.1.0",
"typescript": "^3.9.0",
"typescript": "^4.6.2",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0",
"webpack-dev-server": "^4.0.0-beta.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/fast-colors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"@microsoft/eslint-config-fast-dna": "^2.0.0",
"eslint-config-prettier": "^6.10.1",
"prettier": "2.0.2",
"typescript": "^3.9.0"
"typescript": "^4.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/utilities/fast-eslint-rules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.0",
"typescript": "~3.9.0 || ~4.3.5"
"typescript": "~3.9.0 || ~4.3.5 || ^4.6.2"
radium-v marked this conversation as resolved.
Show resolved Hide resolved
}
}
8 changes: 2 additions & 6 deletions packages/utilities/fast-react-wrapper/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ export type FoundationElementRegistryElement<TRegistry> = TRegistry extends Foun
// @public (undocumented)
export function provideReactWrapper(React: any, designSystem?: DesignSystem): {
wrap: {
<TRegistry extends FoundationElementRegistry<FoundationElementDefinition, any>, TEvents>(registry: TRegistry, config?: ReactWrapperConfig<TEvents> | undefined): Constructable<ReactModule.Component<ReactModule.PropsWithChildren<ReactModule.PropsWithRef<Partial<Pick<FoundationElementRegistryElement<TRegistry>, Exclude<keyof FoundationElementRegistryElement<TRegistry>, "style" | "children">>> & ReactEvents<TEvents> & ReactModule.HTMLAttributes<HTMLElement>> & {
style?: ReactModule.CSSProperties | undefined;
}>, {}, any>>;
<TElement extends HTMLElement, TEvents_1>(type: Constructable<TElement>, config?: ReactWrapperConfig<TEvents_1> | undefined): Constructable<ReactModule.Component<ReactModule.PropsWithChildren<ReactModule.PropsWithRef<Partial<Pick<TElement, Exclude<keyof TElement, "style" | "children">>> & ReactEvents<TEvents_1> & ReactModule.HTMLAttributes<HTMLElement>> & {
style?: ReactModule.CSSProperties | undefined;
}>, {}, any>>;
<TRegistry extends FoundationElementRegistry<FoundationElementDefinition, any>, TEvents>(registry: TRegistry, config?: ReactWrapperConfig<TEvents> | undefined): ReactWrapper<FoundationElementRegistryElement<TRegistry>, TEvents>;
<TElement extends HTMLElement, TEvents_1>(type: Constructable<TElement>, config?: ReactWrapperConfig<TEvents_1> | undefined): ReactWrapper<TElement, TEvents_1>;
};
registry: Registry;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/fast-react-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"ts-loader": "^7.0.2",
"ts-node": "^8.9.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^3.9.0",
"typescript": "^4.6.2",
"webpack": "^4.44.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/fast-web-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"mocha": "^7.1.2",
"prettier": "2.0.2",
"ts-loader": "^4.0.1",
"typescript": "^3.9.0"
"typescript": "^4.6.2"
},
"dependencies": {
"exenv-es6": "^1.1.1"
Expand Down
19 changes: 0 additions & 19 deletions packages/utilities/fast-web-utilities/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,6 @@ export function startsWith(
return stringToSearch.substr(position, searchFor.length) === searchFor;
}

const wordRe = /([A-Z]+[a-z0-9]*|[A-Z]*[a-z0-9]+)/g;

/**
* Matches all instances of the RegExp in the string. Operates similarly to the
* native `String.matchAll`, which is not yet available on all supported
* browsers. Note that the regex *must* be global.
*/
function matchAll(re: RegExp, str: string): string[] {
const matches: string[] = [];

let match: RegExpExecArray | null;
while ((match = re.exec(str))) {
matches.push(match[1]);
}

re.lastIndex = 0;
return matches;
}

/**
* Determines if the specified string is undefined, null, empty, or whitespace.
* True if the value is undefined, null, empty, or whitespace, otherwise false.
Expand Down
Loading