Skip to content

Tags

Tags

2.1.0

Toggle 2.1.0's commit message
js-path-resolver 2.1.0

2.0.2

Toggle 2.0.2's commit message
js-path-resolver 2.0.2

2.0.1

Toggle 2.0.1's commit message
js-path-resolver 2.0.1

2.0.0

Toggle 2.0.0's commit message
js-path-resolver 2.0.0

Vue 3. The major version is the Vue 2 to Vue 3 move and nothing else. The
resolver itself, which is what almost every consumer imports, is unchanged and
needs no framework, so upgrading from 1.1.0 changes nothing unless you import
js-path-resolver/vuex or js-path-resolver/vue-plugin.

Breaking

- the Vue plugin is Vue 3 only and takes the store:
  app.use(DotPathPlugin, { store }). It used to reach the store through the
  component, which Vue 3 cannot do: Vue reads a global property with
  globalProperties[key], a plain access on that object, so anything installed
  there is read with globalProperties as its receiver and never sees the
  component. Verified against Vue 3.5.43's source. Installing with no store
  throws a TypeError naming the fix. createDotPathDispatcher(store) is exported
  for use outside a component.
- js-path-resolver/vuex imports nothing but the resolver. Vue 3's Proxy
  reactivity observes a plain assignment, so the three Vue.set calls are ordinary
  assignments and no framework is left in the file. A test asserts the built file
  names no vue import.
- the vue peer dependency is ^3, was ^2, and is still optional. The main entry
  has no peer requirement.

Fixed

- path.set warned "was not defined in the state object" when adding a property
  that was not there, which is its documented purpose and the reason it called
  Vue.set under Vue 2. It fired on correct use and carried no information. The
  other mutations still check.

- 43 tests across 12 suites. Verified from an installed tarball for all three
  entry points in both module systems, with no vue installed at all, and inside a
  real Vue 3 app under server-side rendering.
- development dependencies are esbuild and vue 3; reported vulnerabilities are
  zero. Runtime dependencies: none, as always.

Vue 2 users stay on 1.1.0, the last release with the Vue 2 plugin. It carries the
same licence and all six of its fixes.

1.1.0

Toggle 1.1.0's commit message
js-path-resolver 1.1.0

The first release under a licence. Everything up to 1.0.14 shipped with no
licence field, so default copyright applied and nobody could lawfully use it.
This one is MIT, copyright Steven Spungin, 2018 to present.

Six fixes, each with a test that fails without it.

Resolver, the published entry point:

- unescape lacked a global flag, so only the first escape in a segment was
  removed. A path such as a\.b\.c resolved to the wrong property and reported
  exists true with field undefined.
- bracket notation read the right element and mutated the wrong one. foo[2]
  returned a fieldName of "2]", so set and delete addressed a property named
  "2]" while leaving the array untouched.

Vuex module and Vue plugin, never published before:

- the module's vue import was commented out with three Vue.set calls still in
  place, so path.set threw ReferenceError on first use.
- this.$dp.set threw TypeError on every call: set was attached to the shared
  prototype function, so the receiver was that function and not the component.
- path.clear threw ReferenceError on every string, via an instanceof String test
  that a string primitive cannot satisfy and an error branch with an undeclared
  variable in it.
- path.list.move before and after were off by one whenever the item sat ahead of
  the reference, because the reference was located before the item was removed.

Adds

- exports for ESM and CommonJS, plus a minified browser global.
- two new entry points: js-path-resolver/vuex and js-path-resolver/vue-plugin.
  vue is an optional peer dependency on ^2, since Vue.set is a Vue 2 API.

Toolchain

- esbuild replaces webpack 4 and babel 6; the Node test runner replaces mocha
  and chai. Development dependencies fell from eight to two, and reported
  vulnerabilities from 112 to one low advisory in vue itself, dev only.
- 41 tests across 11 suites, verified from an installed tarball for all three
  entry points in both module systems.

Runtime dependencies: none, as before.
require('js-path-resolver').default is unchanged.

Vue 3 support follows in 2.0.0.