Skip to content

Commit

Permalink
Fix type-checking errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gitKrystan authored and mansona committed Jan 19, 2024
1 parent cc7b94e commit fa1a8a3
Show file tree
Hide file tree
Showing 23 changed files with 1,247 additions and 1,358 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ node_modules
tmp
*.log
test/**/yarn.lock
test/**/*.js
test/**/*.js.map
transforms/**/*.js
transforms/**/*.js.map
helpers/**/*.js
helpers/**/*.js.map
!**/__testfixtures__/**/*
6 changes: 6 additions & 0 deletions helpers/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Type predicate. Checks if the given value is a `Record<string, unknown>`. */
export function isRecord<R extends Record<string, unknown>>(
value: unknown
): value is R {
return value !== null && typeof value === 'object';
}
25 changes: 19 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"bin": {
"ember-no-implicit-this-codemod": "./bin/cli.js"
},
"files": [
"/bin",
"/helpers/**/*.js",
"/transforms/no-implicit-this/index.js",
"/transforms/no-implicit-this/helpers/**/*.js"
],
"scripts": {
"build": "tsc",
"clean": "tsc --build --clean",
Expand All @@ -27,30 +33,36 @@
"debug:codemod:not-working": "node --inspect-brk ./bin/cli",
"debug:telemetry": "node --inspect-brk ./bin/telemetry.js",
"lint:js": "eslint .",
"test": "jest",
"lint:ts": "tsc --noEmit",
"postpublish": "yarn clean",
"prepublishOnly": "yarn build",
"release": "release-it",
"test": "jest",
"pretest:integration": "yarn build",
"test:integration": "ts-node ./test/run-test.ts",
"update-docs": "codemod-cli update-docs"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"testMatch": [
"<rootDir>/transforms/**/test.js"
"<rootDir>/transforms/**/test.{js,ts}"
]
},
"dependencies": {
"codemod-cli": "^2.1.0",
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"codemod-cli": "^3.2.0",
"debug": "^4.1.1",
"ember-codemods-telemetry-helpers": "^3.0.0",
"ember-template-recast": "^3.3.2"
"ember-template-recast": "^6.1.4"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.4",
"@tsconfig/strictest": "^2.0.1",
"@types/chalk": "^2.2.0",
"@types/common-tags": "^1.8.0",
"@types/debug": "^4.1.8",
"@types/jscodeshift": "^0.11.6",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
Expand All @@ -62,9 +74,10 @@
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.4.0",
"execa": "^3.4.0",
"jest": "^26.6.3",
"jest": "^29.1.0",
"prettier": "^1.19.1",
"release-plan": "^0.6.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "~5.0.4"
},
Expand Down
Loading

0 comments on commit fa1a8a3

Please sign in to comment.