Skip to content

Commit

Permalink
chore(codemods): fix issues related to ts 5.5 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 20, 2024
1 parent 11e6f87 commit 0e865c5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"@fluentui/scripts-jest": "*",
"@fluentui/scripts-tasks": "*"
"@fluentui/scripts-tasks": "*",
"typescript": "5.3.3"
},
"dependencies": {
"tslib": "^2.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { runComponentToCompat, buildCompatHash, ComponentToCompat, RawCompat, getNamedExports } from './compatHelpers';
import {
runComponentToCompat,
buildCompatHash,
getNamedExports,
type RawCompat,
type ComponentToCompat as ComponentToCompatType,
} from './compatHelpers';
import { ExportMapping } from './namedExports';
import { CodeMod } from '../../types';
import { SourceFile } from 'ts-morph';
Expand All @@ -12,7 +18,7 @@ function getPath(root: string, componentName: string) {
return `${root}${componentName}`;
}

export function createComponentToCompat(comp: RawCompat): ComponentToCompat {
export function createComponentToCompat(comp: RawCompat): ComponentToCompatType {
return {
oldPath: getPath(completePath, comp.componentName),
newComponentPath: getPath(newPathStart, comp.componentName),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CodeMod, ModResult, NoOp } from '../../../../codeMods/types';
import { CodeMod as CodeModType, ModResult, NoOp } from '../../../../codeMods/types';
import { Err } from '../../../../helpers/result';
const CodeMod: CodeMod<string> = {

const CodeMod: CodeModType<string> = {
run: () => {
return Err<ModResult, NoOp>({ logs: [] });
},
Expand Down
5 changes: 5 additions & 0 deletions syncpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ const config = {
dependencies: ['@fluentui/**'],
isIgnored: true,
},
{
packages: ['@fluentui/codemods'],
dependencies: ['typescript'],
isIgnored: true,
},
{
packages: ['@fluentui/fluentui-repo'],
dependencies: [
Expand Down

0 comments on commit 0e865c5

Please sign in to comment.