-
Notifications
You must be signed in to change notification settings - Fork 27
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
Upgrade to Yarn v3.0.0-rc2 #653
Conversation
Followed the migration docs, but it failed in As it's not yet released, I used the Instead of asking others to use |
|
Gave up on PnP. The sass-loader/style-loader/vue-loader were not finding a way to load the SCSS variables as they were not in Tried this too - https://gist.github.com/kubijo/8c2346dcfe6a3380a700906c4bd6bb04, without luck. |
Codecov Report
@@ Coverage Diff @@
## master #653 +/- ##
=======================================
Coverage 85.24% 85.24%
=======================================
Files 69 69
Lines 1491 1491
Branches 114 114
=======================================
Hits 1271 1271
Misses 186 186
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Appears to be working OK. Should unblock some work for #651 |
@kinow is this ready to go now, after deconflicting? |
Yes, I was just waiting for yarn to finish running to resolve the conflicts here. If you review it locally, it will install yarn V3. It may take a while. After that, when you switch to a different branch, everything should work fine, but you may have a Thanks! |
And now the build is not happy with our enums I think. Looked at the diff of the push-force, nothing out of ordinary. Guess will need to fix this one in the morning after some strong ☕ |
Alright, removing the istanbul-instrumenter-loader everything works I think, but breaks coverage. 🤔 |
Tests pass, coverage appears to be OK, linter OK... now build is failing due to the webpack loaders 😅 error in ./node_modules/graphql-language-service-interface/esm/GraphQLLanguageService.js
Module parse failed: Unexpected token (100:23)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }
| let customRules = null;
> if (extensions?.customValidationRules &&
| typeof extensions.customValidationRules === 'function') {
| customRules = extensions.customValidationRules(this._graphQLConfig); I think the Related perhaps to vuejs/vue#11088, although that issue is about optional chaining in Vue templates. But more likely related to this issue vuejs/vue-loader#1697 |
The problem I was having with the optional null was not related to the Vue issues linked above. Turns out I simply forgot about Adding the GraphQL libraries there enabled Babel to transpile them using the plug-ins for null/coalesce operator. |
@hjoliver ready for review now. CI is passing. I was worried about coverage, but looks like it's working fine. 🎉 |
babel.config.js
Outdated
['babel-plugin-istanbul', { extension: ['.js', '.vue'] }] | ||
] | ||
return { presets, plugins } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Different syntax to make it clear that we have an array, and also to access the api
object and enable the cache. It's also possible to access the NODE_ENV
that way if necessary, and write JS code to enable/disable plug-ins per environment (e.g. I'll probably completely disable everything related to istanbul & coverage when env === 'production'
, but for another PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The important new lines here are
['@babel/plugin-proposal-nullish-coalescing-operator'],
['@babel/plugin-proposal-optional-chaining']
For the object?.property
operator.
transpileDependencies: ['vuetify'], | ||
transpileDependencies: [ | ||
'graphql-language-service-interface', | ||
'graphql-language-service-parser', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two dependencies broke the build due to the null-coallesce operator. I think that could happen in our current Yarn V1 build too at some point?
@@ -678,7 +678,7 @@ export async function mutate (mutation, args, apolloClient) { | |||
} | |||
// command in a different format (e.g. info command) | |||
return [TaskState.SUBMITTED, result] | |||
} catch { | |||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one of the Webpack loaders was not happy about this syntax, even though it was working before. I think a new and more strict rule was added somewhere in some dependency 🤷♂️
@@ -15,7 +15,7 @@ | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
|
|||
@import '../../../node_modules/vuetify/src/styles/styles'; | |||
@import '~vuetify/src/styles/styles'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ~
is the correct way. The other syntax is valid depending on your build tools. And I think ~@
means that it's a file in the current project, while ~
means it's a file in the node_modules
folder. This broke with Yarn V3 with PnP mode (plug-and-play, when you have no node_modules
folder, but instead each dependency loaded from a cache, from what I understand).
@@ -160,7 +160,7 @@ import TreeItem from '@/components/cylc/tree/TreeItem' | |||
import Vue from 'vue' | |||
import TaskState from '@/model/TaskState.model' | |||
import Task from '@/components/cylc/Task' | |||
import clonedeep from 'lodash.clonedeep' | |||
import cloneDeep from 'lodash/cloneDeep' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first one was using the lodash.clonedeep
single dependency, which was a transitive dependency.
Our build failed as Yarn is more strict about the transitive dependencies not declared in our package.json
(we had similar issue in Python & setuptools I think? Maybe a trend in build tools? anyhoo).
Instead of simply adding the new dependency, the change here is using importing the cloneDeep
module from our already imported lodash
dependency. Tree shaking doesn't seem to work too well for Lodash at the moment with our Vue-CLI/Babel/Webpack build chain, but it does with RollUp and with with Vite, which we will probably have a chance to look into when moving to Vue 3.
autoprefixer: {} | ||
} | ||
plugins: [ | ||
require('autoprefixer') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yarn failed to build due to the old syntax? 🤷♂️ copied this from the autoprefixer docs.
I've updated the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me 👍
Interesting, what was the error? I'm using Vue cli, sass, and PnP without issues |
It was failing to locate files from local (as in the project source) and from Vuetify (before in the Like this one: cylc-ui/src/styles/cylc/_workflow.scss Lines 18 to 19 in 5d9e38c
|
I cloned this PR, enabled PnP, ran
it fails due to cyclic dependencies
|
@merceyz trying it now too. diff --git a/.yarnrc.yml b/.yarnrc.yml
index 2b422cd3..b89f1a5a 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -1,4 +1,4 @@
-nodeLinker: node-modules
+nodeLinker: pnp
yarnPath Then ...
➤ YN0062: │ fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=1cc4b2 The platform linux is incompatible with this module, build skipped.
➤ YN0000: └ Completed in 0s 800ms
➤ YN0000: Done with warnings in 2s 378ms All good. But now ERROR Error: Your application tried to access @babel/plugin-proposal-private-methods, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: @babel/plugin-proposal-private-methods
Required by: /home/kinow/Development/python/workspace/cylc-ui/
Require stack:
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/plugins.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/@vue-cli-plugin-babel-virtual-b65a631ec3/0/cache/@vue-cli-plugin-babel-npm-4.5.13-655520332c-020ffd412d.zip/node_modules/@vue/cli-plugin-babel/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/@vue-cli-service-virtual-56dd58e06a/0/cache/@vue-cli-service-npm-4.5.13-1a50881d57-21c836bf2d.zip/node_modules/@vue/cli-service/lib/Service.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/@vue-cli-service-virtual-56dd58e06a/0/cache/@vue-cli-service-npm-4.5.13-1a50881d57-21c836bf2d.zip/node_modules/@vue/cli-service/bin/vue-cli-service.js
Error: Your application tried to access @babel/plugin-proposal-private-methods, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: @babel/plugin-proposal-private-methods
Required by: /home/kinow/Development/python/workspace/cylc-ui/
Require stack:
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/plugins.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/@vue-cli-plugin-babel-virtual-b65a631ec3/0/cache/@vue-cli-plugin-babel-npm-4.5.13-655520332c-020ffd412d.zip/node_modules/@vue/cli-plugin-babel/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/@vue-cli-service-virtual-56dd58e06a/0/cache/@vue-cli-service-npm-4.5.13-1a50881d57-21c836bf2d.zip/node_modules/@vue/cli-service/lib/Service.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/@vue-cli-service-virtual-56dd58e06a/0/cache/@vue-cli-service-npm-4.5.13-1a50881d57-21c836bf2d.zip/node_modules/@vue/cli-service/bin/vue-cli-service.js
at Function.external_module_.Module._resolveFilename (/home/kinow/Development/python/workspace/cylc-ui/.pnp.cjs:29862:55)
at resolve (internal/modules/cjs/helpers.js:80:19)
at resolveStandardizedName (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/plugins.js:111:7)
at resolvePlugin (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/plugins.js:55:10)
at loadPlugin (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/files/plugins.js:63:20)
at loadPlugin.next (<anonymous>)
at createDescriptor (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/@babel-core-npm-7.14.3-9181aae4d9-b91ed6adc7.zip/node_modules/@babel/core/lib/config/config-descriptors.js:187:16)
at createDescriptor.next (<anonymous>)
at evaluateSync (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/gensync-npm-1.0.0-beta.2-224666d72f-a7437e58c6.zip/node_modules/gensync/index.js:251:28)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/gensync-npm-1.0.0-beta.2-224666d72f-a7437e58c6.zip/node_modules/gensync/index.js:31:34 Let's try installing that dependency. kinow@ranma:~/Development/python/workspace/cylc-ui$ yarn add -D @babel/plugin-proposal-private-methods
➤ YN0001: Error: Assertion failed: Expected an error to have been set
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:297:21682
at Function.start (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:282:3885)
at Zh.execute (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:297:21471)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Zh.validateAndExecute (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:193:618)
at async Hn.run (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:205:1845)
at async Hn.runExit (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:205:2012)
at async i (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:297:12327)
at async r (/home/kinow/Development/python/workspace/cylc-ui/.yarn/releases/yarn-3.0.0-rc.2.cjs:297:10681)
➤ Errors happened when preparing the environment required to run this command. That started happening with V3. Is there another way to install dev dependencies with V3 @merceyz ? I added it manually, as well as other dependencies (@oliver-sanders one of the errors that happened was missing diff --git a/.yarnrc.yml b/.yarnrc.yml
index 2b422cd3..b89f1a5a 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -1,4 +1,4 @@
-nodeLinker: node-modules
+nodeLinker: pnp
yarnPath: .yarn/releases/yarn-3.0.0-rc.2.cjs
diff --git a/package.json b/package.json
index 90e3fdf9..d93606a2 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,9 @@
"@babel/core": "^7.13.16",
"@babel/eslint-parser": "^7.13.14",
"@babel/plugin-proposal-class-properties": "^7.13.0",
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
"@babel/plugin-proposal-optional-chaining": "^7.14.2",
+ "@babel/plugin-proposal-private-methods": "^7.13.0",
"@cypress/code-coverage": "^3.9.5",
"@cypress/webpack-preprocessor": "^5.7.0",
"@mdi/js": "^5.9.55",
@@ -81,8 +83,10 @@
"eslint-config-standard": "^16.0.2",
"eslint-config-vuetify": "^0.5.0",
"eslint-import-resolver-node": "^0.3.4",
+ "eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.9.0",
"graphql-language-service-utils": "^2.5.2",
"istanbul-instrumenter-loader": "^3.0.1",
diff --git a/yarn.lock b/yarn.lock
index 92476c45..0b0efc82 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6541,7 +6541,9 @@ __metadata:
"@babel/core": ^7.13.16
"@babel/eslint-parser": ^7.13.14
"@babel/plugin-proposal-class-properties": ^7.13.0
+ "@babel/plugin-proposal-nullish-coalescing-operator": ^7.14.2
"@babel/plugin-proposal-optional-chaining": ^7.14.2
+ "@babel/plugin-proposal-private-methods": ^7.13.0
"@cypress/code-coverage": ^3.9.5
"@cypress/webpack-preprocessor": ^5.7.0
"@lumino/algorithm": ^1.6.0
@@ -6578,8 +6580,10 @@ __metadata:
eslint-config-standard: ^16.0.2
eslint-config-vuetify: ^0.5.0
eslint-import-resolver-node: ^0.3.4
+ eslint-plugin-cypress: ^2.11.3
eslint-plugin-import: ^2.22.1
eslint-plugin-node: ^11.1.0
+ eslint-plugin-promise: ^5.1.0
eslint-plugin-vue: ^7.9.0
graphiql: ^1.4.1
graphql: ^15.5.0
@@ -7873,7 +7877,7 @@ __metadata:
languageName: node
linkType: hard
-"eslint-plugin-cypress@npm:^2.10.3":
+"eslint-plugin-cypress@npm:^2.10.3, eslint-plugin-cypress@npm:^2.11.3":
version: 2.11.3
resolution: "eslint-plugin-cypress@npm:2.11.3"
dependencies:
@@ -7996,6 +8000,15 @@ __metadata:
languageName: node
linkType: hard
+"eslint-plugin-promise@npm:^5.1.0":
+ version: 5.1.0
+ resolution: "eslint-plugin-promise@npm:5.1.0"
+ peerDependencies:
+ eslint: ^7.0.0
+ checksum: e62947aaea6882951a1a9f5fe3e3c7925b8dcc222338f7979bd1495ba0f0dc701820116b108be1e801f6e5156eb9a928142f29c659fd21a5d65a4be495bb327d
+ languageName: node
+ linkType: hard
+
"eslint-plugin-promise@npm:~4.2.1":
version: 4.2.1
resolution: "eslint-plugin-promise@npm:4.2.1" However, the following still fail kinow@ranma:~/Development/python/workspace/cylc-ui$ yarn run serve
[SERVER] Error: snapshots directory . doesn't exist
[SERVER] yarn run serve:jupyterhub exited with code 1
--> Sending SIGTERM to other processes..
[CLIENT] yarn run serve:vue exited with code SIGTERM kinow@ranma:~/Development/python/workspace/cylc-ui$ yarn run test:unit
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
WEBPACK Compiling...
[================= ] 69% (building)[BABEL] Note: The code generator has deoptimised the styling of /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/vuetify-virtual-3e336ec291/0/cache/vuetify-npm-2.5.0-b368b19310-07ab169ce9.zip/node_modules/vuetify/dist/vuetify.js as it exceeds the max of 500KB.
[=========================] 98% (after emitting)
WARNING Compiled with 1 warning
warning in ./.yarn/__virtual__/follow-redirects-virtual-0c4ea90a75/0/cache/follow-redirects-npm-1.14.1-e6bdc0f8e5-7381a55bdc.zip/node_modules/follow-redirects/debug.js
Module not found: Error: follow-redirects tried to access debug (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: debug
Required by: follow-redirects@virtual:d192f6b3b31cd5d11a443145a3883a70c04cbd7c813c53085dbaf50263735f1162f10fdbddd53c24e162ec3bc37b90966413084323739b7cf942b8bfb4da8831#npm:1.14.1 (via /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/follow-redirects-virtual-0c4ea90a75/0/cache/follow-redirects-npm-1.14.1-e6bdc0f8e5-7381a55bdc.zip/node_modules/follow-redirects/debug.js)
Ancestor breaking the chain: axios@npm:0.21.1
Ancestor breaking the chain: http-proxy@npm:1.18.1
[=========================] 100% (completed)
WEBPACK Compiled with 1 warning(s)
Warning in ./.yarn/__virtual__/follow-redirects-virtual-0c4ea90a75/0/cache/follow-redirects-npm-1.14.1-e6bdc0f8e5-7381a55bdc.zip/node_modules/follow-redirects/debug.js
Module not found: follow-redirects tried to access debug (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: debug
Required by: follow-redirects@virtual:d192f6b3b31cd5d11a443145a3883a70c04cbd7c813c53085dbaf50263735f1162f10fdbddd53c24e162ec3bc37b90966413084323739b7cf942b8bfb4da8831#npm:1.14.1 (via /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/follow-redirects-virtual-0c4ea90a75/0/cache/follow-redirects-npm-1.14.1-e6bdc0f8e5-7381a55bdc.zip/node_modules/follow-redirects/debug.js)
Ancestor breaking the chain: axios@npm:0.21.1
Ancestor breaking the chain: http-proxy@npm:1.18.1
MOCHA Testing...
RUNTIME EXCEPTION Exception occurred while loading your tests
Error: Qualified path resolution failed - none of those files can be found on the disk.
Source path: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js
Not found: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js
Not found: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js.js
Not found: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js.json
Not found: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js.node
Not found: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js.jsx
Not found: /home/kinow/Development/python/workspace/cylc-ui/dist/js/main.js.react
Require stack:
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/mocha-npm-6.2.3-b87ac0ebf8-c069edeffb.zip/node_modules/mocha/lib/mocha.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/mocha-npm-6.2.3-b87ac0ebf8-c069edeffb.zip/node_modules/mocha/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/lib/runner/configureMocha.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/lib/runner/TestRunner.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/lib/MochaWebpack.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/lib/createMochaWebpack.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/lib/cli/index.js
- /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/bin/mochapack
at Function.external_module_.Module._resolveFilename (/home/kinow/Development/python/workspace/cylc-ui/.pnp.cjs:29904:55)
at Function._resolveFilename (/home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/src/util/registerRequireHook.ts:21:34)
at Function.external_module_.Module._load (/home/kinow/Development/python/workspace/cylc-ui/.pnp.cjs:29724:48)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/mocha-npm-6.2.3-b87ac0ebf8-c069edeffb.zip/node_modules/mocha/lib/mocha.js:334:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/mocha-npm-6.2.3-b87ac0ebf8-c069edeffb.zip/node_modules/mocha/lib/mocha.js:331:14)
at Mocha.run (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/mocha-npm-6.2.3-b87ac0ebf8-c069edeffb.zip/node_modules/mocha/lib/mocha.js:809:10)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/src/runner/TestRunner.ts:105:23
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/mochapack-virtual-fa9e096079/0/cache/mochapack-npm-1.1.15-394a78aec0-31e2380046.zip/node_modules/mochapack/src/webpack/compiler/registerReadyCallback.ts:14:7
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/tapable-npm-1.1.3-f1c2843426-53ff4e7c39.zip/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:43:1)
at AsyncSeriesHook.lazyCompileHook (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/tapable-npm-1.1.3-f1c2843426-53ff4e7c39.zip/node_modules/tapable/lib/Hook.js:154:20)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:304:22
at Compiler.emitRecords (/home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:499:39)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:298:10
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:485:14
at eval (eval at create (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/tapable-npm-1.1.3-f1c2843426-53ff4e7c39.zip/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/copy-webpack-plugin-virtual-e8b1b4d051/0/cache/copy-webpack-plugin-npm-5.1.2-b9289299c7-e398884dee.zip/node_modules/copy-webpack-plugin/dist/index.js:115:7
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/tapable-npm-1.1.3-f1c2843426-53ff4e7c39.zip/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
at AsyncSeriesHook.lazyCompileHook (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/tapable-npm-1.1.3-f1c2843426-53ff4e7c39.zip/node_modules/tapable/lib/Hook.js:154:20)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:482:27
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip/node_modules/neo-async/async.js:2818:7
at done (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/neo-async-npm-2.6.2-75d6902586-deac9f8d00.zip/node_modules/neo-async/async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/tapable-npm-1.1.3-f1c2843426-53ff4e7c39.zip/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:4:1)
at /home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:464:33
at MemoryFileSystem.writeFile (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/memory-fs-npm-0.4.1-0a5f9b8954-6db6c8682e.zip/node_modules/memory-fs/lib/MemoryFileSystem.js:328:9)
at writeOut (/home/kinow/Development/python/workspace/cylc-ui/.yarn/__virtual__/webpack-virtual-be1be79997/0/cache/webpack-npm-4.46.0-a8158cfa7f-013fa24c00.zip/node_modules/webpack/lib/Compiler.js:462:30)
at Immediate._onImmediate (/home/kinow/Development/python/workspace/cylc-ui/.yarn/cache/memory-fs-npm-0.4.1-0a5f9b8954-6db6c8682e.zip/node_modules/memory-fs/lib/MemoryFileSystem.js:288:4)
at processImmediate (internal/timers.js:461:21)
ERROR mochapack exited with code 1. Haven't tried Cypress with I had so many strange issues like these above, that I thought easier to keep the |
Looks like a bug with the diff --git a/.yarnrc.yml b/.yarnrc.yml
index 2b422cd..5d3489a 100644
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -2,7 +2,6 @@ nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.0.0-rc.2.cjs
-enableNetwork: false
enableStrictSsl: true
networkSettings:
@@ -10,3 +9,5 @@ networkSettings:
enableNetwork: true
"registry.npmjs.org":
enableNetwork: true
+ "*":
+ enableNetwork: false
Yeah, that is the recommended migration path, was just curious why it wasn't working 👍 |
I should have more time to troubleshoot PnP in the next days/weeks @merceyz, but probably after this PR has been merged. But great to hear someone else got vue cli/sass/pnp working. Would you be able to share a link to the repository so I can take a look at it later, please? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chucking in a quick review though I don't understand the yarn3 migration whatsoever.
Installed with yarn and built the UI (build:watch
) all seems fine to me.
A few messages in the "resolution step" that name our package:
➤ YN0060: │ cylc-ui@workspace:. provides eslint (p590b5) with version 7.26.0, which doesn't satisfy what @vue/cli-plugin-eslint and some of its descendants request
➤ YN0060: │ cylc-ui@workspace:. provides eslint (p83bdf) with version 7.26.0, which doesn't satisfy what eslint-config-vuetify and some of its descendants request
➤ YN0002: │ cylc-ui@workspace:. doesn't provide eslint-plugin-promise (pcd7ff), requested by eslint-config-standard
➤ YN0060: │ cylc-ui@workspace:. provides preact (p4c785) with version 10.5.13, which doesn't satisfy what preact-compat and some of its descendants request
➤ YN0002: │ cylc-ui@workspace:. doesn't provide prop-types (pcd96f), requested by graphiql
➤ YN0002: │ cylc-ui@workspace:. doesn't provide react (p8b0df), requested by graphiql
➤ YN0002: │ cylc-ui@workspace:. doesn't provide react-dom (p70cdb), requested by graphiql
Dunno?
I don't know if the other review is resolved so leaving to someone else to hit the merge button.
Thanks for the reviews!!! We have a few more warnings when running tests too that I intend to fix after yarn v3 migration (and also after confirming whether we can update any dependencies; in case that fixes some of these warnings too). These are eslint issues, which doesn't worry me too much. The ➤ YN0060: │ cylc-ui@workspace:. provides eslint (p590b5) with version 7.26.0, which doesn't satisfy what @vue/cli-plugin-eslint and some of its descendants request For these related to GraphiQL and React, we use preact that should provide react, prop-types and other deps required by GraphiQL. But maybe due to the alias these warnings were raised.
merceyz 's review? If so, we had a good chat about Yarn V3 with PNP (doesn't need |
Two approvals, and appears to be working fine (just tested locally again). I've rebased, and push-forced. If CI build passes then I will merge it 👍 |
This closes #593
src/styles/cylc/_tree.scss
(Using PNP, there's nonode_modules
to import Vuetify's sass variables from! 🤔 )Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.