Skip to content
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

version 3.4.3 breaks packing when used with babel-core 6.x #213

Closed
yuvke opened this issue Nov 20, 2018 · 7 comments
Closed

version 3.4.3 breaks packing when used with babel-core 6.x #213

yuvke opened this issue Nov 20, 2018 · 7 comments

Comments

@yuvke
Copy link

yuvke commented Nov 20, 2018

It seems that form version 3.4.3 babel-plugin-react-css-modules requires babel 7.
If this was the intent, then this is a breaking change and should be communicated via a major release, not a patch.

specifically, this is the relevant part of the config I'm using:

const contextDir = path.resolve(__dirname, 'src');
const webpackConfig = {
    module: {
        rules: [{
           test: /\.jsx?$/,
           include: path.resolve(__dirname,'..'),
           use: [{
                loader: 'babel-loader',
                options: {

                    presets: ['react'],
                    plugins: [
                        [
                            'babel-plugin-react-css-modules',
                            {
                                context: contextDir,
                                filetypes: {
                                    ".scss": {
                                        "syntax": "postcss-scss"
                                    }
                                },
                                generateScopedName: '[name]__[local]___[hash:base64:5]'
                            }
                        ],
                        "transform-object-rest-spread"
                    ]
                }
            }],
            exclude: /node_modules/
       }]
}
@LeonDWong
Copy link

Same problem here, could anyone help?

@OpherV
Copy link

OpherV commented Nov 20, 2018

@LeonDWong Try to explicitly lock the package to version 3.4.2 in your package.json

image

@sthzg
Copy link
Contributor

sthzg commented Nov 20, 2018

If this was the intent, then this is a breaking change and should be communicated via a major release, not a patch.

Sorry for causing these problems with yesterday's PRs. A few of the last builds were failing and I was meaning to provide a PR to make the builds green again.

I agree with @yuvke's statement above. Pinning the dependency to 3.4.2 as suggested by @OpherV should work.

@gajus Do you think it makes sense to push the babel 7 upgrade to a 4.x. version line or some kind of @next release tag?

@gajus
Copy link
Owner

gajus commented Nov 20, 2018

That would have been a good choice. I would advice to simply pin the dependency at this point.

Happy to unpublish the latest release and release as v4, though.

👍 , ping me if you suggest this action.

@sthzg
Copy link
Contributor

sthzg commented Nov 20, 2018

@gajus If you can find the time I would be +1 for unpublishing. I was not aware if/when this is still allowed on npm, but it seems that it should work for 3.4.3 and 3.4.4 based on the 72 hours window.

With the default registry (registry.npmjs.org), unpublish is only allowed with versions published in the last 72 hours. If you are trying to unpublish a version published longer ago than that, contact support@npmjs.com.

https://docs.npmjs.com/cli/unpublish

@JZBo
Copy link

JZBo commented Nov 20, 2018

If this was the intent, then this is a breaking change and should be communicated via a major release, not a patch.

That would have been a good choice. I would advice to simply pin the dependency at this point.
Happy to unpublish the latest release and release as v4, though.

I would really welcome and be thankful for that choice, if it were possible. Having a patch release which results in a breaking change causes a lot of problems for us users.

Thanks for your availability.

@gajus
Copy link
Owner

gajus commented Nov 21, 2018

  • v3.4.3, v3.4.4 have unpublished.
  • v4.0.0 has been published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants