Everything should work fine because it is just a patch, not a breaking release.
I am having this log when trying to upgrade to version 5.4.6
[root]\node_modules\ts-loader\node_modules\micromatch\index.js:44
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
^^^
SyntaxError: Unexpected token ...
Here is my webpack.config.js
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.ts', '.js'],
plugins: [new TsconfigPathsPlugin({})],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
},
],
},
],
},
};
Refer to this PR: https://github.com/penta-jelly/re-radio/pull/167
Follow these steps will produce this error
cd e2enpm cinpm run cypress:openCI build result: https://circleci.com/gh/penta-jelly/re-radio/802
what version of node are you running?
I've unpublished 5.4.6 - it looks like node 8 is the minimum requirement and that doesn't appear to be listed in the breaking changes: https://github.com/micromatch/micromatch/blob/bdd32f41e07f401b12ae7c8b04d22b275c88c84b/package.json#L33
Will update ts-loader to 6.0.0 and republish with the appropriate node version range
See https://github.com/TypeStrong/ts-loader/pull/930 for progress
@johnnyreilly I am using node 10. Release this dependencies upgrade on version on 6.0 is fine for me, I will figure a way to solve it on my project.
Okay that's somewhat unexpected - according to micromatch the minimum is node 8. So I'm not clear why it's failing on your project.... The error message suggests that it's the { ...options that's problematic. This suggests you're running on pre node 8.6 (see https://medium.com/@adambrodziak/use-js-object-spread-operator-instead-of-object-assign-pattern-in-node-8-125a4914f6dd )
Am I right? Can you think of another reason why this would be an issue for you?
I am thinking the reason it is failed because ts-loader was ran directly on Browser (Cypress mechanism) but not on NodeJS environment. Do you have any idea about how to solve it?
I am thinking the reason it is failed because ts-loader was ran directly on Browser
I'm not sure I understand how that would work... Either way, I'd still expect object spread to be just fine since chrome has had it for a very long time indeed!
Puzzling...
@pvtri96 It is a problem in cypress not in ts-loader. Cypress comes with electron builtin with chorme 63 that does not support object spread. You should be fine after this https://github.com/cypress-io/cypress/pull/4001 gets released. What you can do is to not run your code in electron but the browser instead. You can do it like this https://docs.cypress.io/guides/guides/command-line.html#cypress-run
@B3zo0 thanks for your in-depth answer. Instead of trying to find a workaround for this, I am better stick with [email protected] while waiting for Cypress to release the new version with Chrome 73 support.
Re-released as 6.0.0 https://github.com/TypeStrong/ts-loader/releases/tag/v6.0.0
any updates on this? because with v6.0.0 it has this problem.
Without knowing your problem I can't advise in detail. Micromatch 4 is a breaking changes release and so (accordingly) ts-loader 6 is too. My advice is stick with 5.x until you're able to upgrade. That may mean waiting for a cypress release if that's what is impacting you.
This issue should not be a problem since Cypress 3.3.0.
Hi, i have this issue @6.0.3
Most helpful comment
This issue should not be a problem since Cypress 3.3.0.