Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed duped core types #800

Merged
merged 2 commits into from
Jan 31, 2024
Merged

fix: removed duped core types #800

merged 2 commits into from
Jan 31, 2024

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Jan 31, 2024

A while back I added:

    "paths": {
      "@openfeature/core": [ "./packages/shared/src" ]
    },      

To the tsconfigs, which helped with local dev by always resolving src/* files from sibling packages instead of anything in their dist/.

It also had the nasty side-effect of causing our type bundling to include types from this package in it's output, causing duplicated artifacts and possible compiler issues. I've overridden this with a custom tsconfig.rollup.json.

Before this fix, the web/server SDK dists contained dupes of the stuff in shared:

import EventEmitter from 'events';

type FlagValueType = 'boolean' | 'string' | 'number' | 'object';
type PrimitiveValue = null | boolean | string | number;
type JsonObject = {
    [key: string]: JsonValue;
};
type JsonArray = JsonValue[];
/**
 * Represents a JSON node value.
 */

After this fix, they import them:

import { BaseHook, HookHints, EvaluationDetails, JsonValue, EvaluationLifeCycle, ManageLogger, Eventing, ClientMetadata, ProviderStatus, ClientProviderEvents, GenericEventEmitter, CommonEventDetails, FlagValue, CommonProvider, EvaluationContext, Logger, ResolutionDetails, EventHandler, OpenFeatureCommonAPI, ManageContext } from '@openfeature/core';
export * from '@openfeature/core';

@toddbaert toddbaert requested a review from a team as a code owner January 31, 2024 16:56
Copy link
Member

@lukas-reining lukas-reining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this makes sense. I also saw this when looking at the shipped types lately but did not realize that this would clash.
The change looks good!

@toddbaert toddbaert added this pull request to the merge queue Jan 31, 2024
Merged via the queue into main with commit 7cc1e09 Jan 31, 2024
8 checks passed
@toddbaert toddbaert deleted the fix/remove-duped-types branch January 31, 2024 19:54
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.25](core-v0.0.24...core-v0.0.25)
(2024-01-31)


### ✨ New Features

* use interface for events
([#798](#798))
([b47b1dc](b47b1dc))


### 🐛 Bug Fixes

* removed duped core types
([#800](#800))
([7cc1e09](7cc1e09))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: OpenFeature Bot <[email protected]>
Signed-off-by: openfeature-peer-update-bot <[email protected]>
Co-authored-by: openfeature-peer-update-bot <[email protected]>
toddbaert pushed a commit that referenced this pull request Jan 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.4.12](web-sdk-v0.4.11...web-sdk-v0.4.12)
(2024-01-31)


### ✨ New Features

* use interface for events
([#798](#798))
([b47b1dc](b47b1dc))


### 🐛 Bug Fixes

* removed duped core types
([#800](#800))
([7cc1e09](7cc1e09))


### 🧹 Chore

* **main:** release core 0.0.25
([#801](#801))
([53a89ab](53a89ab))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.11.0](server-sdk-v1.10.0...server-sdk-v1.11.0)
(2024-01-31)


### ✨ New Features

* use interface for events
([#798](#798))
([b47b1dc](b47b1dc))


### 🐛 Bug Fixes

* removed duped core types
([#800](#800))
([7cc1e09](7cc1e09))


### 🧹 Chore

* **main:** release core 0.0.25
([#801](#801))
([53a89ab](53a89ab))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.5-experimental](nestjs-sdk-v0.0.4-experimental...nestjs-sdk-v0.0.5-experimental)
(2024-01-31)


### ✨ New Features

* adds ErrorOptions to Error constructor
([#765](#765))
([2f59a9f](2f59a9f))


### 🐛 Bug Fixes

* **nest:** add peer deps for nestjs-core and rxjs 9
([#784](#784))
([a452bdd](a452bdd))
* removed duped core types
([#800](#800))
([7cc1e09](7cc1e09))


### 📚 Documentation

* Nest SDK ([#750](#750))
([a21634d](a21634d))
* update nestjs readme examples
([#787](#787))
([c6a357a](c6a357a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Signed-off-by: OpenFeature Bot <[email protected]>
toddbaert added a commit that referenced this pull request Feb 1, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.1-experimental](react-sdk-v0.1.0-experimental...react-sdk-v0.1.1-experimental)
(2024-01-31)


### ✨ New Features

* adds ErrorOptions to Error constructor
([#765](#765))
([2f59a9f](2f59a9f))


### 🐛 Bug Fixes

* removed duped core types
([#800](#800))
([7cc1e09](7cc1e09))


### 📚 Documentation

* update react readme
([#792](#792))
([1666597](1666597))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Signed-off-by: OpenFeature Bot <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants