-
Notifications
You must be signed in to change notification settings - Fork 477
[expo-cli] turtle-v2 credentials change hasLocal,hasRemote bahviour #2452
[expo-cli] turtle-v2 credentials change hasLocal,hasRemote bahviour #2452
Conversation
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.
Please update the changelog.
credentialsJSONRaw = JSON.parse(credentialsJSONContents); | ||
} catch (err) { | ||
throw new Error( | ||
`credentials.json must exist in the project root directory and consist a valid 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.
`credentials.json must exist in the project root directory and consist a valid JSON` | |
`credentials.json must exist in the project root directory and contain a valid JSON` |
`credentials.json must exist in the project root directory and consist a valid JSON` | ||
); | ||
} | ||
return credentialsJSONRaw; |
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.
return credentialsJSONRaw; |
let credentialsJSONRaw; | ||
try { | ||
const credentialsJSONContents = await fs.readFile(credentialsJsonFilePath, 'utf8'); | ||
credentialsJSONRaw = JSON.parse(credentialsJSONContents); |
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.
credentialsJSONRaw = JSON.parse(credentialsJSONContents); | |
return JSON.parse(credentialsJSONContents); |
@@ -116,7 +107,21 @@ async function readAsync(projectDir: string): Promise<CredentialsJson> { | |||
return credentialsJson; | |||
} | |||
|
|||
async function readRawAsync(projectDir: string): Promise<any> { | |||
const credentialsJsonFilePath = path.join(projectDir, 'credentials.json'); | |||
let credentialsJSONRaw; |
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.
let credentialsJSONRaw; |
//const originalWarn = console.warn; | ||
//const originalLog = console.log; | ||
//beforeAll(() => { | ||
// console.warn = jest.fn(); | ||
// console.log = jest.fn(); | ||
//}); | ||
//afterAll(() => { | ||
// console.warn = originalWarn; | ||
// console.log = originalLog; | ||
//}); |
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.
?
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.
forgot to uncomment
3f93d29
to
5617672
Compare
why
It's not clear what credentials are used during build, misconfiguration of credentials.json might cause expo-cli to use remote ones without any info for the user