From 07c87a01d56edd12516b5a32e097aa227e91fda6 Mon Sep 17 00:00:00 2001 From: Barry Dwyer Date: Tue, 8 Oct 2024 09:40:36 +0200 Subject: [PATCH] Update tsconfig modules to node16 to allow imports from commons Added scopes as an export in the commons package --- packages/client/src/components/ScopedComponent.tsx | 2 +- packages/client/tsconfig.json | 4 ++-- packages/commons/package.json | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/client/src/components/ScopedComponent.tsx b/packages/client/src/components/ScopedComponent.tsx index 945ab746af..24165f2022 100644 --- a/packages/client/src/components/ScopedComponent.tsx +++ b/packages/client/src/components/ScopedComponent.tsx @@ -1,6 +1,6 @@ import React from 'react' import { usePermissions } from '@client/hooks/useAuthorization' -import { Scope } from '@opencrvs/commons/build/dist/scopes' +import { Scope } from '@opencrvs/commons/scopes' interface ScopeComponentProps { scopes?: Scope[] diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index c9f3a762f1..5aa130bec0 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -9,8 +9,8 @@ "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, - "module": "esnext", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "Node16", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, diff --git a/packages/commons/package.json b/packages/commons/package.json index e081e41584..eacd1a16a0 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -12,7 +12,8 @@ "./authentication": "./build/dist/authentication.js", "./http": "./build/dist/http.js", "./fixtures": "./build/dist/fixtures.js", - "./assignment": "./build/dist/assignment.js" + "./assignment": "./build/dist/assignment.js", + "./scopes": "./build/dist/scopes.js" }, "scripts": { "start": "yarn build:watch",