Skip to content

Releases: WJSoftware/wj-config

v3.0.0-beta.1

09 Nov 07:54
269dc70
Compare
Choose a tag to compare
v3.0.0-beta.1 Pre-release
Pre-release

What's Changed

Full Changelog: v2.0.2...v3.0.0-beta.1

TypeScript Explained

The new TypeScript support is super accurate. Learn about it in the wiki page about this.

v2.0.2

30 May 17:21
Compare
Choose a tag to compare

What's Changed

  • build(deps-dev): bump typescript from 4.7.4 to 5.2.2 by @dependabot in #27
  • fix(build): Test for out folder before attempting to remove it by @webJose in #31
  • fix: Correct includeEnvironment() to specify IEnvironment instead of Environment by @webJose in #32
  • fix: Enclose call to fetch() in try..catch for better unit testing experience by @webJose in #33
  • chore(tests): Comment incomplete Dictionary tests to allow UT runs by @webJose in #34

New Contributors

Full Changelog: v2.0.0...v2.0.2

v2.0.0

20 May 23:06
Compare
Choose a tag to compare

v2.0.0-rc3

20 Feb 03:56
Compare
Choose a tag to compare
v2.0.0-rc3 Pre-release
Pre-release
  • Minor performance improvement on how URL-building functions work
  • fix: Prefixed all instances of window with globalThis so NodeJS won't complain.

v2.0.0-rc2

20 Feb 01:52
a57d6fb
Compare
Choose a tag to compare
v2.0.0-rc2 Pre-release
Pre-release

v2.0.0-rc2

Create URL's using window.location

It was not previously possible in browser scenarios to create a relative URL with a different protocol (for example, to initiate web sockets with the current host). Now this is possible. The created URL will of course be an absolute URL, but it will use the value of window.location.hostname, making it unnecessary to configure host names or do concatenation outside the URL-building functions.

Example

{
    "ws": {
        "api": {
            "rootPath": "/api",
            ...
        },
        "sockets": {
            "scheme": "wss",
            "rootUrl": "/sockets",
            "chat": "/livechat"
        }
    }
}

With a configuration JSON similar to the one shown, the URL-building function config.ws.sockets.chat() would return an absolute URL using the wss scheme and whatever host is in window.location.hostname.

FetchedConfig Renamed

The data source FetchedConfigDataSource has been renamed to FetchedDataSource, and its corresponding builder function has been renamed from addFetchedConfig() to addFetched().

Intellisense Corrections

Some Intellisense metadata was outdated. It should be up to date now.

IBuilder.addSingleValue()'s Intellisense Spit into Two Overloads

The functionality of the function was not changed, nor did the data source changed. The interpretation of the parameters, however, changed to accomodate two overloads. Intellisense should show you the new correct way of calling this data source function.

Dictionary Validation

Validation of the provided dictionary (flat) object has been improved to detect non-flat objects early, specifically during construction of the data source.

Delayed Functions Can Now Be Asynchronous

In the past release, all data sources gained the ability to accept as main data argument a function that returned the data instead of directly providing the data. This enhancement responded to the need to avoid wasted CPU cycles loading data sources that are conditioned and therefore may end up not being needed. The problem: The functions had to be synchronous. This update allows the functions to be asynchronous.

v2.0.0-rc.1

09 Jan 04:55
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release
  • Minor fixes for bugs found while adding unit tests.
  • Deleted ComputedDataSource. Use addObject() instead of addComputed().

v2.0.0-rc.0

25 Dec 06:12
Compare
Choose a tag to compare
v2.0.0-rc.0 Pre-release
Pre-release

Conditional Data Source Addition

  • Adds the when() builder function to condition the addition of a data source.
  • Defines the current environment as an object with a name and traits property.
  • Adds the whenAllTraits() and whenAnyTrait() builder functions to condition data sources based on the traits of the current environment.
  • Adds the forEnvironment() and addPerEnvironment() as a new way to add per-environment configuration based on conditionals.

v1.1.0

28 Jul 20:36
247c861
Compare
Choose a tag to compare

New Features:

  1. The environment object can be created ahead of time to be used in building the applications config module.

v1.0.2

19 Jul 07:09
Compare
Choose a tag to compare

Removed default environment variables source as it causes problems with React.

Initial Release

17 Jul 23:59
Compare
Choose a tag to compare

First Release