create-powerapps-project 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/plopfile.js CHANGED
@@ -354,8 +354,14 @@ export default async (plop) => {
354
354
  type: 'npmInstall',
355
355
  data: {
356
356
  packages: {
357
- devDependencies: ['powerapps-project-pcf', '@types/react@16', '@types/react-dom@16']
357
+ devDependencies: ['powerapps-project-pcf', '@types/react@16', '@types/react-dom@16', 'eslint-plugin-react-hooks']
358
358
  }
359
+ },
360
+ skip: (answers) => {
361
+ if (!answers.react) {
362
+ return 'react not included';
363
+ }
364
+ return;
359
365
  }
360
366
  }
361
367
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-powerapps-project",
3
3
  "description": "💧 plop generator for Dataverse development",
4
- "version": "1.2.1",
4
+ "version": "1.2.3",
5
5
  "license": "MIT",
6
6
  "exports": "./lib/index.js",
7
7
  "engines": {
@@ -15,7 +15,7 @@ interface IAppContextProviderProps extends IAppContext {
15
15
  export const AppContextProvider = (props: IAppContextProviderProps): JSX.Element => {
16
16
  const { context, children } = props;
17
17
 
18
- return <AppContext.Provider value={context}>{children}</AppContext.Provider>;
18
+ return <AppContext.Provider value={{ context }}>{children}</AppContext.Provider>;
19
19
  };
20
20
 
21
21
  export const useAppContext = (): IAppContext => React.useContext(AppContext);