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

Handle "onlyLocals" breaking change #9

Merged
merged 1 commit into from
Mar 9, 2021
Merged

Conversation

slorber
Copy link
Contributor

@slorber slorber commented Feb 4, 2021

Hi, Docusaurus maintainer here.

On our next release, we upgrade a few dependencies to prepare the migration to Webpack 5.

There's a breaking change in the css-loader dependency that affects this plugin.
https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#400-2020-07-25

Without this upgrade, you'll get an error such as

ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'onlyLocals'. These properties are valid:
   object { url?, import?, modules?, sourceMap?, importLoaders?, esModule? }

Note this is a breaking change for this plugin, as the new version published may not be compatible anymore with older Docusaurus versions, so you'd rather bump the major version.

As a sidenote, I'm thinking about creating a docusaurus community org with various plugins, would you be interested to move this plugin here so that it's easier for other trusted Docusaurus community members to do the upgrades?

slorber added a commit to jest-website-migration/jest that referenced this pull request Feb 4, 2021
@slorber
Copy link
Contributor Author

slorber commented Mar 9, 2021

@rlamana can you please merge/release this?

We are releasing Docusaurus and it's going to affect all users of your SaaS plugin that are going to upgrade.


For users looking for a workaround: use this dependency instead:

    "docusaurus-plugin-sass": "git+https://github.com/slorber/docusaurus-plugin-sass.git#patch-2",

You can also use patch-package or the Yarn 2 patch protocol to get this solved (get inspiration from jestjs/jest@6ae0b75)

@rlamana
Copy link
Owner

rlamana commented Mar 9, 2021

@slorber I will merge and release these changes today.

@slorber
Copy link
Contributor Author

slorber commented Mar 9, 2021

thanks. :)

my proposal to move this package to a new docusaurus-community repo is still valid. Are you ok to add it?

Otherwise, we might still do it anyway because many users rely on this plugin and it can be annoying for them to wait for a publish :)

@rlamana rlamana merged commit 2590505 into rlamana:master Mar 9, 2021
@rlamana
Copy link
Owner

rlamana commented Mar 9, 2021

docusaurus-plugin-sass v0.1.12 has been released.

@slorber I'll be more than happy to add it to the docusaurus-community repo, does it already exist? how should I proceed?

@slorber
Copy link
Contributor Author

slorber commented Mar 10, 2021

Thanks, it's not yet created but will ping you when it is ;)

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

Successfully merging this pull request may close these issues.

2 participants