Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Compatibility with PostCSS 8 #5

Closed
JLHwung opened this issue Sep 16, 2020 · 0 comments
Closed

Compatibility with PostCSS 8 #5

JLHwung opened this issue Sep 16, 2020 · 0 comments

Comments

@JLHwung
Copy link

JLHwung commented Sep 16, 2020

Thanks for your PostCSS test utilities!

As you probably know, PostCSS 8 was released a few days ago. It would be great if you could make this utility compatible with the latest version. The creators of the project have even released this migration guide.

Currently running postcss-tape with a plugin using updated API will throw

i.process is not a function

because the testPlugin should be initialized by PostCSS

const result = await testPlugin.process(sourceCSS, processOptions, pluginOptions);

--- const result = await testPlugin.process(sourceCSS, processOptions, pluginOptions);
+++ const result = await postcss([testPlugin(pluginOptions)]).process(sourceCSS, processOptions);
romainmenke pushed a commit to csstools/postcss-plugins that referenced this issue Jan 16, 2022
romainmenke added a commit to csstools/postcss-plugins that referenced this issue Jan 20, 2022
* 1.0.0

* 1.1.0

* 1.2.0

* 1.2.1

* 1.2.2

* 1.3.0

* 1.3.1

- Update project settings

* 2.0.0

- Updated: Support for PostCSS v6
- Updated: Support Node v4
- Added: Another test

* 2.0.1

* Better support failing tests

* Support specifying alternative plugin(s)

* Update devDependencies

* 2.1.0

* New option: processOptions

* Document features

* Update devDependencies

* 2.2.0

* 3.0.0

* 3.0.0

* Log caught errors and update README with correct options

* 4.0.0

* 5.0.0

* Update project configuration

* Fix CLI typo in README.md

The CLI (i.e. "arguments") instructions included an `=` sign; the equals sign is not accurate nor necessary. Just to be sure, I tested:

1. I copied `.tape.js` as `.tape.test.js`, and removed several test cases.
2. Command `postcss-tape --config=./tape.test.js # used existing `/.tape.js` (saw many test cases).
3. Command `postcss-tape --config=./tape.test.js # used new file `/.tape.test.js` (saw few test cases).

* Fix bug with tests for errors

* Cleanup how options are taken in

* Fix how an error is handled

* Update dependencies

* 5.0.1

* Fix an issue with loading a test plugin

* 5.0.2

* Update dependencies

* support postcss 8 plugins, closes csstools/postcss-tape#5 (csstools/postcss-tape#6)

* Support Node 10 (csstools/postcss-tape#7)

* Update CHANGELOG.md

* 6.0.0

* Update project conventions

* 6.0.1

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* changelog

* merge

* tests

* tests

* simplify

* some docs

* docs, more tests and fixes

* add docs for postcss version updates

* fixes

* more tests

* Apply suggestions from code review

* more tests

* code comment

* try relative path require/import

* typo

* fix

* fix

* fix

* more docs

* document what to do after node 20 released

Co-authored-by: Jonathan Neal <jonathantneal@hotmail.com>
Co-authored-by: Philip Bordallo <git@philipbordallo.com>
Co-authored-by: Wesley B <wesleyboar@users.noreply.github.com>
Co-authored-by: Renée Kooi <renee@kooi.me>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant