Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
fix: remove extra tsconfig.spec.json entry in app tsconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Nov 20, 2020
1 parent aa22905 commit 9de074e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions e2e/react-native-e2e/tests/react-native.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ test('sync npm dependencies for autolink', async () => {
updateFile(join('package.json'), (content) => {
const json = JSON.parse(content);
json.dependencies['react-native-image-picker'] = '1.0.0';
json.dependencies['react-native-gesture-handler'] = '1.0.0';
json.dependencies['react-native-safe-area-contex'] = '1.0.0';
return JSON.stringify(json, null, 2);
});
// Add import for Nx to pick up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,19 @@ export function syncDeps(
const npmDeps = findAllNpmDependencies(graph, projectName);
const packageJsonPath = join(projectRoot, 'package.json');
const packageJson = readJsonFile(packageJsonPath);
const newDeps = include?.split(',') || [];
const newDeps = [];
const includeDeps = include?.split(',');
let updated = false;

if (!packageJson.dependencies) {
packageJson.dependencies = {};
updated = true;
}

if (includeDeps) {
npmDeps.push(...includeDeps);
}

npmDeps.forEach((dep) => {
if (!packageJson.dependencies[dep]) {
packageJson.dependencies[dep] = '*';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
],
"exclude": [
Expand Down

0 comments on commit 9de074e

Please sign in to comment.