Skip to content

Commit

Permalink
refactor: Update package configurations to remove core workspace refe…
Browse files Browse the repository at this point in the history
…rences and set core as private (#657)

* refactor: Update package configurations to remove core workspace references and set core as private

* chore: Bump package versions for filter, powerbi, and fusion modules

* refactor: Update module paths and configurations for core package

* refactor: Add "src" directory to TypeScript include paths in tsconfig

* refactor: Remove build scripts from core package.json

* refactor: Update tsconfig to include core module paths and references

* refactor: Remove emitDeclarationOnly option from tsconfig

* refactor: Rename core package to workspace-core and update module paths
  • Loading branch information
EdwardBrunton authored Jan 2, 2025
1 parent f7d6c2c commit bce37b1
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 46 deletions.
25 changes: 3 additions & 22 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
{
"name": "core",
"name": "workspace-core",
"version": "1.0.0",
"type": "module",
"sideEffects": false,
"license": "MIT",
"scripts": {
"build": "tsup ./src/index.ts --format cjs,esm --dts --clean",
"build:prod": "tsup ./src/index.ts --format cjs,esm --dts --clean",
"pr-release": "tsx ../../.github/helpers/src/pre-version.ts publish"
},
"publishConfig": {
"access": "public"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
"private": true,
"module": "src/index.ts",
"dependencies": {},
"peerDependencies": {
"react": ">= 16.8.0",
Expand Down
12 changes: 7 additions & 5 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"compilerOptions": {
"composite": true,
"declaration": true,
"module": "ESNext",
"target": "ESNext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
"rootDir": "src",
"baseUrl": "src",
"allowJs": false,
"declaration": true,
"emitDeclarationOnly": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": false,
"moduleResolution": "Bundler",
"module": "ESNext"
}
"forceConsistentCasingInFileNames": true
},
"include": ["src"]
}
3 changes: 1 addition & 2 deletions packages/filter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-filter",
"version": "4.0.7",
"version": "4.0.8",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down Expand Up @@ -30,7 +30,6 @@
"@equinor/eds-icons": "^0.18.0",
"@equinor/eds-tokens": "^0.9.0",
"@tanstack/react-query": "^5.32.0",
"core": "workspace:^",
"react-error-boundary": "^4.0.13",
"react-sortablejs": "^6.1.4",
"react-virtual": "^2.10.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button, Icon, Search } from '@equinor/eds-core-react';
import { useMemo, useRef, useState } from 'react';
import { FilterClearIcon } from '../../icons';
import { FilterGroup, FilterValueType } from '../../types';
import { useClickOutside } from 'core';
import { useClickOutside } from 'workspace-core';
import { Case, Switch } from '../../utils/Switch';
import { StyledSearchButton, StyledFilterHeaderGroup, StyledTitle, StyledWrapper } from './expandedFilterGroup.styles';
import { VirtualContainer } from '../virtualContainer/VirtualContainer';
Expand Down
8 changes: 6 additions & 2 deletions packages/filter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": false,
"moduleResolution": "Bundler",
"module": "ESNext"
}
"module": "ESNext",
"paths": {
"workspace-core": ["../../core/src"]
}
},
"references": [{ "path": "../core" }]
}
3 changes: 1 addition & 2 deletions packages/power-bi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-powerbi",
"version": "3.0.10",
"version": "3.0.11",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down Expand Up @@ -33,7 +33,6 @@
"markdown-to-jsx": "^7",
"powerbi-client": "^2",
"powerbi-client-react": "^1",
"core": "workspace:^",
"react-error-boundary": "^4",
"react-sortablejs": "^6",
"react-virtual": "^2",
Expand Down
2 changes: 1 addition & 1 deletion packages/power-bi/src/lib/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Icon, Search } from '@equinor/eds-core-react';
import { useState } from 'react';
import styled from 'styled-components';
import { useClickOutside } from 'core';
import { useClickOutside } from 'workspace-core';
import { FilterClearIcon } from '../../icons';
import { FilterController } from '../Filter/Filter';
import { Case, Switch } from '../switch/Switch';
Expand Down
8 changes: 6 additions & 2 deletions packages/power-bi/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": false,
"moduleResolution": "Bundler",
"module": "ESNext"
}
"module": "ESNext",
"paths": {
"workspace-core": ["../../core/src"]
}
},
"references": [{ "path": "../core" }]
}
2 changes: 1 addition & 1 deletion packages/workspace-fusion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-fusion",
"version": "9.0.21",
"version": "9.0.22",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down
8 changes: 6 additions & 2 deletions packages/workspace-fusion/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": false,
"moduleResolution": "Bundler",
"module": "ESNext"
"module": "ESNext",
"paths": {
"workspace-core": ["../core/src"]
}
},
"include": ["src"]
"include": ["src"],
"references": [{ "path": "../core" }]
}
6 changes: 0 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bce37b1

Please sign in to comment.