You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vue-accessible-color-picker package should use Vue.js 3. Since this change is not backwards-compatible, a new major version should be released when making the changes for the migration.
Known or outstanding issues
The vue-jest package requires the package typescript to be installed as a dependency even though the project doesn’t use TypeScript.
Testing the vue-accessible-color-picker package via npm link doesn’t work because of a difference in behavior compared with an actual npm installed dependency: Since the vue-accessible-color-picker package lists vue as a development dependency, it will be installed in its project directory and thus it’ll be part of the packages in that directory’s node_modules directory. A project consuming the npm linked dependency via npm link vue-accessible-color-picker will behave different than it would have with an npm installed dependency because code (e.g. vue) may resolve packages from the dependency rather than from itself. In essence, using npm install, a dependency’s development dependencies are not installed, but with npm link, they’re effectively installed.
Now, when testing the package using npm link in the package and npm link vue-accessible-color-picker in a consuming project (e.g. vue-accessible-color-picker-website), two different instances of the Vue.js packages are being used. This causes unexpected rendering errors due to the use of Symbols in Vue.js. The package vue should be declared as a peer dependency (i.e. as [email protected]) instead of a development dependency because no development processes in the package itself actually require Vue to be installed at all. Unfortunately, vue-test-utils start to fail when removing the vue package.
Workaround: Not available.
There is one cumbersome way to get this working temporarily for plugins which have no production dependencies whatsoever by npm-linking the plugin and then removing its node_modules directory. This will require you to re-install you plugin package’s dependencies again each time.
# Link packagecd vue-accessible-color-picker
npm run build
npm link
rm -rf node_modules
# Reference linked packagecd ../../sites/vue-accessible-color-picker-website
npm install
npm link vue-accessible-color-picker
npm start
The text was updated successfully, but these errors were encountered:
The vue-accessible-color-picker package should use Vue.js 3. Since this change is not backwards-compatible, a new major version should be released when making the changes for the migration.
Known or outstanding issues
The vue-jest package requires the package typescript to be installed as a dependency even though the project doesn’t use TypeScript.
The vue-test-utils package is unable to find a wrapper object via
wrapper.findComponent({ ref: 'colorSpace' })
.When using
Wrapper.findComponent
like this, the test errors unexpectedly with:Upstream bug report: not filed.
Workaround: Use
wrapper.find('.vacp-color-space')
wherevacp-color-space
is a class name used on the element that is usingref="colorSpace"
.Solution: This is not supposed to work according to vue-test-utils API reference:
findComponent
:The rollup-plugin-vue package is unable to compile the distribution bundles in the same way it does for the current version of the vue-accessible-color-picker package (see Needs an extra plugin for
.css/.scss/.sass
(with Vue.js 3 beta) vuejs/rollup-plugin-vue#364 (comment) for more details)..css/.scss/.sass
(with Vue.js 3 beta).css/.scss/.sass
(with Vue.js 3 beta) vuejs/rollup-plugin-vue#364 (comment).Testing the vue-accessible-color-picker package via
npm link
doesn’t work because of a difference in behavior compared with an actualnpm install
ed dependency: Since the vue-accessible-color-picker package lists vue as a development dependency, it will be installed in its project directory and thus it’ll be part of the packages in that directory’snode_modules
directory. A project consuming thenpm link
ed dependency vianpm link vue-accessible-color-picker
will behave different than it would have with annpm install
ed dependency because code (e.g. vue) may resolve packages from the dependency rather than from itself. In essence, usingnpm install
, a dependency’s development dependencies are not installed, but withnpm link
, they’re effectively installed.Now, when testing the package using
npm link
in the package andnpm link vue-accessible-color-picker
in a consuming project (e.g. vue-accessible-color-picker-website), two different instances of the Vue.js packages are being used. This causes unexpected rendering errors due to the use ofSymbol
s in Vue.js. The package vue should be declared as a peer dependency (i.e. as[email protected]
) instead of a development dependency because no development processes in the package itself actually require Vue to be installed at all. Unfortunately, vue-test-utils start to fail when removing the vue package.Workaround: Not available.
There is one cumbersome way to get this working temporarily for plugins which have no production dependencies whatsoever by npm-linking the plugin and then removing its
node_modules
directory. This will require you to re-install you plugin package’s dependencies again each time.The text was updated successfully, but these errors were encountered: