-
Notifications
You must be signed in to change notification settings - Fork 4k
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: remove awkward cfn2ts script entries #8231
Changes from 3 commits
127dca2
0865798
9cbc4e4
dcd45e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const baseConfig = require('../tools/cdk-build-tools/config/eslintrc'); | ||
baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; | ||
module.exports = baseConfig; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,8 @@ dist | |
.LAST_BUILD | ||
*.snk | ||
!jest.config.js | ||
|
||
.nyc_output | ||
coverage | ||
nyc.config.js | ||
!.eslintrc.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ coverage | |
.LAST_BUILD | ||
*.snk | ||
jest.config.js | ||
|
||
.eslintrc.js |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ export async function generateShrinkwrap(options: ShrinkwrapOptions): Promise<Pa | |
const packageJsonDir = path.dirname(packageJsonFile); | ||
|
||
const yarnLockLoc = await findYarnLock(packageJsonDir); | ||
const yarnLock: YarnLock = lockfile.parse(await fs.readFile(yarnLockLoc, { encoding: 'utf-8' })); | ||
const yarnLock: YarnLock = lockfile.parse(await fs.readFile(yarnLockLoc, { encoding: 'utf8' })); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yuck. Someone missed the ball on strong typing here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this might be some stuff in |
||
const pkgJson = await loadPackageJson(packageJsonFile); | ||
|
||
const lock = await generateLockFile(pkgJson, yarnLock, packageJsonDir); | ||
|
@@ -42,7 +42,7 @@ export async function generateShrinkwrap(options: ShrinkwrapOptions): Promise<Pa | |
|
||
if (options.outputFile) { | ||
// Write the shrinkwrap file | ||
await fs.writeFile(options.outputFile, JSON.stringify(lock, undefined, 2), { encoding: 'utf-8'} ); | ||
await fs.writeFile(options.outputFile, JSON.stringify(lock, undefined, 2), { encoding: 'utf8'} ); | ||
} | ||
|
||
return lock; | ||
|
@@ -123,7 +123,7 @@ async function findUp(fileName: string, start: string) { | |
} | ||
|
||
async function loadPackageJson(fileName: string): Promise<PackageJson> { | ||
return JSON.parse(await fs.readFile(fileName, { encoding: 'utf-8' })); | ||
return JSON.parse(await fs.readFile(fileName, { encoding: 'utf8' })); | ||
} | ||
|
||
async function fileExists(fullPath: string): Promise<boolean> { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test fixtures should not be affected. |
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.
To prevent this from happening in the future, should we have a linter rule that cross-references against 'CloudFormation' key under 'cdk-build' in the package.json?
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.
Well in fact, the
isAWS
condition on the rule I modified is that cross-reference against thecdk-build.cloudformation
key...