Skip to content

Commit

Permalink
fix(azure-react): updates app insights web version and ts config (#106)
Browse files Browse the repository at this point in the history
[5471](https://dev.azure.com/amido-dev/Amido-Stacks/_workitems/edit/5471)

- bump app insights web patch version to resolve linting -
microsoft/applicationinsights-react-js#32
- update ts config to resolve linting
  • Loading branch information
Danphillipz authored Feb 24, 2023
2 parents dc4e877 + fdb2233 commit 319b1a2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
generateFiles,
names,
offsetFromRoot,
readProjectConfiguration,
Tree,
} from '@nrwl/devkit';
import { Linter } from '@nrwl/linter';
Expand All @@ -19,6 +20,7 @@ import {
appInsightsWebVersion,
} from '../../../utils/versions';
import { AppInsightsWebGeneratorSchema } from './schema';
import updateTsConfig from './utils/tsconfig';

type NormalizedSchema = BaseNormalizedSchema<AppInsightsWebGeneratorSchema>;

Expand Down Expand Up @@ -72,6 +74,9 @@ export default async function appInsightsWebGenerator(
// Generate files
addFiles(tree, normalizedOptions);

const project = readProjectConfiguration(tree, options.name);
updateTsConfig(tree, path.join(project.root, 'tsconfig.json'));

// Format files
await formatFiles(tree);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { updateJson, Tree } from '@nrwl/devkit';

const updateTsConfig = (tree: Tree, filePath: string) => {
updateJson(tree, filePath, tsconfig => {
const update = tsconfig;

const compiler: any = {
composite: true,
declaration: true,
};

update.compilerOptions = {
...update.compilerOptions,
...compiler,
};

update.include = [...new Set([...(update.include || []), '**/*.tsx'])];
return update;
});
};

export default updateTsConfig;
2 changes: 1 addition & 1 deletion packages/azure-react/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const appInsightsWebVersion = '2.8.9';
export const appInsightsWebVersion = '2.8.10';
export const appInsightsReactVersion = '3.4.0';

0 comments on commit 319b1a2

Please sign in to comment.