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

Getting current to prep transitioning off #2

Open
wants to merge 64 commits into
base: master
Choose a base branch
from

Conversation

lorenjohnson
Copy link
Member

No description provided.

trygveaa and others added 30 commits April 19, 2017 19:04
…77)

If a file only has import statements, the parser would crash when hot
module reloading was enabled because firstNonImportDeclarationNode would
be undefined. This makes those files work by adding the hot module block
at the end of the file in those cases.
From #89
`Identifiers can't have quotes. If the key is supposed to be a string, it should be t.stringLiteral(name). Because it is an identifier it is an invalid AST.`
* Implemented support for extra postcss plugins
* Added test for extra postcss plugins
* Fixed eslint issues
* Another fix of eslint
* Fixed eslint
* Removed string type of FiletypeOptions
* Updated test to use latest syntax
* Updated flow to 0.48.0 to use $ReadOnlyArray

BREAKING CHANGE: Filetype is now an object with properties 'syntax' and 'plugins'
…#116)

* Fix the ajv-keywords "keyword select requires $data option" warning.

* Disable the id-match eslint rule when configuring the ajv $data property.

* Upgrade ajv to ^5.0.0.

* style:
* Add .eslintignore for test fixtures

The double quotes that the plugin adds go against the linting 
config of the project, and editors that auto-fix linting rules
will try to convert quotes in `expected.js` files to single quotes,
causing tests to fail.  It seems safest to ignore all fixture files
from linting.

* Allow createObjectExpression to take a boolean

* Allow getClassName to take an options argument

The only option is to silence styleName errors, for example in production.
If `silenceStyleNameErrors` is true, the styleNames which cannot be
found will simply be removed from the resulting classNames, matching
the behavior of `react-css-modules`.

This commit alone will not result in a change in behavior, the next
steps will be to pass in the option from the babel-plugin.

* Add `silenceStyleNameErrors` to options schema

* Pass silenceStyleNameErrors to getClassName

This hooks up the options set by the user into getClassName, so that it
has an effect.  However, getClassName can also be used at runtime,
which this commit does not address.

* Provide silenceStyleNameErrors at runtime

This commit adds the options object for getClassName iif silenceStyleNameErrors
is true.  By not always including the options object, it helps to save 
a few characters in the generated code.

* Restructure Configuration docs

Seeing the flow types first thing in the Configuration section was
confusing to new users, so this adds a brief example of how to set
babel plugin options, and moves the flow types underneath the table
of options.

* Add silenceStyleNameErrors to README

* Loosen InputObjectType

Flow was already not happy with using `InputObjectType` within its own
definition, and was converting it to `{[key: string]: string | any}`
when I inspected it in Nuclide.  

I’m honestly not sure how to specify a union type on an indexer as was
being attempted, because flow complains as soon as you try to provide
an object that has a property with a typed value.

* Allow more options to handle missing styleNames

This changes the option from a boolean “silenceStyleNameErrors” to an
enum “handleMissingStyleName” option, with possible values of “throw”
(default), “warn”, and “ignore”.
The default was not being set for non-namespaced styles.  This caused
a bug where errors were not thrown for runtime style names, since the
options are not passed in if they are only the defaults.
Tests seem to pass, also tested locally and seems to work fine in a real project
* feat: add custom attribute mapping feature

* style: fix extra spaces caused by formatter

* style: fix eslint errrors

* style: fix extra spaces again
* add ability to pass options to postcss plugins

* add postcss plugin options usage docs into readme
* Added some notes on porting

* docs: update wording
gajus and others added 30 commits September 3, 2018 13:00
removed a double 'several several' typo
* fix: update build command and dependencies

This commit updates the presets and plugins used in the build-helper
run script to use equivalent v7-packages from the @babel namespace.

* fix: update demo deps and config

Fixes #204
* fix: update test fixtures

Fixes #211

* chore: assert exception on use with missing import
BREAKING CHANGE:
* babel 7 requirement
BREAKING CHANGE:
* exclude logic is used to exclude JSXElement containing files
* fix: cannot read property 'split' of undefined

* fix: lint error in getClassName

* fix: lint error in getClassName
* fix: cannot read property 'split' of undefined

* fix: lint error in getClassName

* fix: lint error in getClassName

* test: add test case for absolute import
…te (#230)

* feat: add skipAbsentStyleName

* test: add test case for skipAbsentStyleName

* feat: refactor skipAbsentStyleName traversal

* fix: readd require.resolve for resource path

* feat: update options naming

* docs: update for skip option

* refactor: traverse JSXAttribute instead of element
* feat: add autoResolveMultiImports option

* test: add test cases for autoResolveMultiImports option

* docs: add for autoResolveMultiImports option
The links to webpack's documents on hot module reloading was out of date
* fix: handle spread

* test: handle spread

* test: add test case for spread

* spread: remove keys exclusion, avoid falsy values

* refactor: handle spread separated in another file
* feat: use RegExp as including condition in filetype config

* test: add corresponding test cases.

* fix: do not use extension-style filrtype as RegExp pattern

* feat: modify the priority between RegExp pattern filetype and extension style filetype

* style: no continue

* style: for comment #2

Co-authored-by: super-cattle <xuxinhang4567#126.com>
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.