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: support null valued config attributes #22

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

ronenkapelian
Copy link
Contributor

deepFreeze couldn't support with null valued attributes.

Added null validation on freeze objects

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

@ronenkapelian ronenkapelian self-assigned this Dec 8, 2024
Copy link

github-actions bot commented Dec 8, 2024

Hi it is me, your friendly bot helper! 👋
I've packed this commit for you 😊
You can install it like this:

{
  "dependencies": {
      "@map-colonies/config": "https://ghatmpstorage.blob.core.windows.net/npm-packages/config-32d4fbf1813ec56bcebe7e3786fad46011424e2b.tgz"
  }
}

The link will expire in a week ⌛

Copy link
Contributor

@netanelC netanelC left a comment

Choose a reason for hiding this comment

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

Good Job!

tests/helpers.spec.ts Outdated Show resolved Hide resolved
const action = () => {
data.name = 'i try to change'; // try to change freezed object
};
expect(action).toThrow(/Cannot assign to read only property/);
Copy link
Collaborator

Choose a reason for hiding this comment

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

only if we had an assertion to check if object is frozen 🤔

tests/helpers.spec.ts Outdated Show resolved Hide resolved
tests/helpers.spec.ts Show resolved Hide resolved
Copy link

Hi it is me, your friendly bot helper! 👋
I've packed this commit for you 😊
You can install it like this:

{
  "dependencies": {
      "@map-colonies/config": "https://ghatmpstorage.blob.core.windows.net/npm-packages/config-0b3dc92ae3b030c88ba41d8446c40523217cb41b.tgz"
  }
}

The link will expire in a week ⌛

Copy link

Hi it is me, your friendly bot helper! 👋
I've packed this commit for you 😊
You can install it like this:

{
  "dependencies": {
      "@map-colonies/config": "https://ghatmpstorage.blob.core.windows.net/npm-packages/config-d8ec119499154cd767ac9d61b920ae4f1a9799ae.tgz"
  }
}

The link will expire in a week ⌛

@CptSchnitz
Copy link
Collaborator

good job son

@ronenkapelian ronenkapelian merged commit 02387d2 into master Dec 11, 2024
5 checks passed
@ronenkapelian ronenkapelian deleted the fix-null-value-freeze branch December 11, 2024 07:52
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.

3 participants