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
[x] 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 vue@3.x) 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 package
cd vue-accessible-color-picker
npm run build
npm link
rm -rf node_modules
# Reference linked package
cd ../../sites/vue-accessible-color-picker-website
npm install
npm link vue-accessible-color-picker
npm start
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
[x] The vue-jest package requires the package typescript to be installed as a dependency even though the project doesn’t use TypeScript.
[x] 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:wrapper.find('.vacp-color-space')
wherevacp-color-space
is a class name used on the element that is usingref="colorSpace"
.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 https://github.com/vuejs/rollup-plugin-vue/issues/364#issuecomment-716108784 for more details).
.css/.scss/.sass
(with Vue.js 3 beta)[ ] 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. asvue@3.x
) 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.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.