-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improvement: expand peer dependencies #100
Conversation
Added more libraries which are common to 42 projects to the `peerDependencies` list as well as included them to the `devDependencies` list. This is due to issues with out-of-sync dependencies being used by `@42.nl/ui` in conjunction to most of the internal 42 projects. In addition this commit also resolves most of the `peerDependency` warnings of the included dependencies.
New dependencies added: babel-eslintAuthor: Sebastian McKenzie Description: Custom parser for ESLint Homepage: https://github.com/babel/babel-eslint
|
ESLint | babel-eslint |
---|---|
4.x | >= 6.x |
3.x | >= 6.x |
2.x | >= 6.x |
1.x | >= 5.x |
Install
Ensure that you have substituted the correct version lock for eslint
and babel-eslint
into this command:
$ npm install eslint@4.x babel-eslint@8 --save-dev
# or
$ yarn add eslint@4.x babel-eslint@8 -D
Setup
.eslintrc
{
"parser": "babel-eslint",
"rules": {
"strict": 0
}
}
Check out the ESLint docs for all possible rules.
Configuration
sourceType
can be set to'module'
(default) or'script'
if your code isn't using ECMAScript modules.allowImportExportEverywhere
(defaultfalse
) can be set totrue
to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level.codeFrame
(defaulttrue
) can be set tofalse
to disable the code frame in the reporter. This is useful since some eslint formatters don't play well with it.
.eslintrc
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false,
"codeFrame": true
}
}
Run
$ eslint your-files-here
classnames
Author: Jed Watson
Description: A simple utility for conditionally joining classNames together
Homepage: https://github.com/JedWatson/classnames#readme
Created | almost 5 years ago |
Last Updated | 9 months ago |
License | MIT |
Maintainers | 1 |
Releases | 23 |
Keywords | react, css, classes, classname, classnames, util and utility |
README
Classnames
A simple JavaScript utility for conditionally joining classNames together.
Install with npm, Bower, or Yarn:
npm:
npm install classnames --save
Bower:
bower install classnames --save
Yarn (note that yarn add
automatically saves the package to the dependencies
in package.json
):
yarn add classnames
Use with Node.js, Browserify, or webpack:
var classNames = require('classnames');
classNames('foo', 'bar'); // => 'foo bar'
Alternatively, you can simply include index.js
on your page with a standalone <script>
tag and it will export a global classNames
method, or define the module if you are using RequireJS.
Project philosophy
We take the stability and performance of this package seriously, because it is run millions of times a day in browsers all around the world. Updates are thoroughly reviewed for performance impacts before being released, and we have a comprehensive test suite.
Classnames follows the SemVer standard for versioning.
There is also a Changelog.
Usage
The classNames
function takes any number of arguments which can be a string or object.
The argument 'foo'
is short for { foo: true }
. If the value associated with a given key is falsy, that key won't be included in the output.
classNames('foo', 'bar'); // => 'foo bar'
classNames('foo', { bar: true }); // => 'foo bar'
classNames({ 'foo-bar': true }); // => 'foo-bar'
classNames({ 'foo-bar': false }); // => ''
classNames({ foo: true }, { bar: true }); // => 'foo bar'
classNames({ foo: true, bar: true }); // => 'foo bar'
// lots of arguments of various types
classNames('foo', { bar: true, duck: false }, 'baz', { quux: true }); // => 'foo bar baz quux'
// other falsy values are just ignored
classNames(null, false, 'bar', undefined, 0, 1, { baz: null }, ''); // => 'bar 1'
Arrays will be recursively flattened as per the rules above:
var arr = ['b', { c: true, d: false }];
classNames('a', arr); // => 'a b c'
Dynamic class names with ES2015
If you're in an environment that supports computed keys (available in ES2015 and Babel) you can use dynamic class names:
let buttonType = 'primary';
classNames({ [`btn-${buttonType}`]: true });
Usage with React.js
This package is the official replacement for classSet
, which was originally shipped in the React.js Addons bundle.
One of its primary use cases is to make dynamic and conditional className
props simpler to work with (especially more so than conditional string manipulation). So where you may have the following code to generate a className
prop for a <button>
in React:
var Button = React.createClass({
// ...
render () {
var btnClass = 'btn';
if (this.state.isPressed) btnClass += ' btn-pressed';
else if (this.state.isHovered) btnClass += ' btn-over';
return <button className={btnClass}>{this.props.label}</button>;
}
});
You can express the conditional classes more simply as an object:
var classNames = require('classnames');
var Button = React.createClass({
// ...
render () {
var btnClass = classNames({
btn: true,
'btn-pressed': this.state.isPressed,
'btn-over': !this.state.isPressed && this.state.isHovered
});
return <button className={btnClass}>{this.props.label}</button>;
}
});
Because you can mix together object, array and string arguments, supporting optional className
props is also simpler as only truthy arguments get included in the result:
var btnClass = classNames('btn', this.props.className, {
'btn-pressed': this.state.isPressed,
'btn-over': !this.state.isPressed && this.state.isHovered
});
Alternate dedupe
version
There is an alternate version of classNames
available which correctly dedupes classes and ensures that falsy classes specified in later arguments are excluded from the result set.
This version is slower (about 5x) so it is offered as an opt-in.
To use the dedupe version with Node.js, Browserify, or webpack:
var classNames = require('classnames/dedupe');
classNames('foo', 'foo', 'bar'); // => 'foo bar'
classNames('foo', { foo: false, bar: true }); // => 'bar'
For standalone (global / AMD) use, include dedupe.js
in a <script>
tag on your page.
Alternate bind
version (for css-modules)
If you are using css-modules, or a similar approach to abstract class "names" and the real className
values that are actually output to the DOM, you may want to use the bind
variant.
Note that in ES2015 environments, it may be better to use the "dynamic class names" approach documented above.
var classNames = require('classnames/bind');
var styles = {
foo: 'abc',
bar: 'def',
baz: 'xyz'
};
var cx = classNames.bind(styles);
var className = cx('foo', ['bar'], { baz: true }); // => "abc def xyz"
Real-world example:
/* components/submit-button.js */
import { Component } from 'react';
import classNames from 'classnames/bind';
import styles from './submit-button.css';
let cx = classNames.bind(styles);
export default class SubmitButton extends Component {
render () {
let text = this.props.store.submissionInProgress ? 'Processing...' : 'Submit';
let className = cx({
base: true,
inProgress: this.props.store.submissionInProgress,
error: this.props.store.errorOccurred,
disabled: this.props.form.valid,
});
return <button className={className}>{text}</button>;
}
};
Polyfills needed to support older browsers
classNames >=2.0.0
Array.isArray
: see MDN for details about unsupported older browsers (e.g. <= IE8) and a simple polyfill.
Object.keys
: see MDN for details about unsupported older browsers (e.g. <= IE8) and a simple polyfill. This is only used in dedupe.js
.
License
MIT. Copyright (c) 2017 Jed Watson.
eslint-plugin-flowtype
Author: Gajus Kuizinas
Description: Flowtype linting rules for ESLint.
Homepage: https://github.com/gajus/eslint-plugin-flowtype#readme
Created | about 4 years ago |
Last Updated | 23 days ago |
License | BSD-3-Clause |
Maintainers | 1 |
Releases | 140 |
Direct Dependencies | lodash |
Keywords | eslint, plugin and flowtype |
eslint-plugin-jsx-a11y
Author: Ethan Cohen
Description: Static AST checker for accessibility rules on JSX elements.
Homepage: https://github.com/evcohen/eslint-plugin-jsx-a11y#readme
Created | over 3 years ago |
Last Updated | 3 months ago |
License | MIT |
Maintainers | 4 |
Releases | 69 |
Direct Dependencies | @babel/runtime , aria-query , array-includes , ast-types-flow , axobject-query , damerau-levenshtein , emoji-regex , has and jsx-ast-utils |
Keywords | eslint, eslintplugin, eslint-plugin, a11y, accessibility and jsx |
@types/webpack
Author: Unknown
Description: TypeScript definitions for webpack
Homepage: http://npmjs.com/package/@types/webpack
Created | over 3 years ago |
Last Updated | 23 days ago |
License | MIT |
Maintainers | 1 |
Releases | 120 |
Direct Dependencies | @types/anymatch , @types/node , @types/tapable , @types/uglify-js , @types/webpack-sources and source-map |
README
Installation
npm install --save @types/webpack
Summary
This package contains type definitions for webpack (https://github.com/webpack/webpack).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack
Additional Details
- Last updated: Sun, 25 Aug 2019 12:40:42 GMT
- Dependencies: @types/tapable, @types/uglify-js, @types/anymatch, @types/source-map, @types/webpack-sources, @types/node
- Global values: none
Credits
These definitions were written by Qubo https://github.com/tkqubo, Benjamin Lim https://github.com/bumbleblym, Boris Cherny https://github.com/bcherny, Tommy Troy Lin https://github.com/tommytroylin, Mohsen Azimi https://github.com/mohsen1, Jonathan Creamer https://github.com/jcreamer898, Alan Agius https://github.com/alan-agius4, Spencer Elliott https://github.com/elliottsj, Jason Cheatham https://github.com/jason0x43, Dennis George https://github.com/dennispg, Christophe Hurpeau https://github.com/christophehurpeau, ZSkycat https://github.com/ZSkycat, John Reilly https://github.com/johnnyreilly, Ryan Waskiewicz https://github.com/rwaskiewicz, Kyle Uehlein https://github.com/kuehlein, Grgur Grisogono https://github.com/grgur, and Rubens Pinheiro Gonçalves Cavalcante https://github.com/rubenspgcavalcante.
fibers
Author: Marcel Laverdet
Description: Cooperative multi-tasking for Javascript
Homepage: https://github.com/laverdet/node-fibers
Created | over 8 years ago |
Last Updated | 5 months ago |
License | MIT |
Maintainers | 1 |
Releases | 50 |
Direct Dependencies | detect-libc |
Keywords | fiber, fibers, coroutine, thread, async, parallel, worker, future and promise |
lodash
Author: John-David Dalton
Description: Lodash modular utilities.
Homepage: https://lodash.com/
Created | over 7 years ago |
Last Updated | about 11 hours ago |
License | MIT |
Maintainers | 2 |
Releases | 108 |
Keywords | modules, stdlib and util |
README
lodash v4.17.15
The Lodash library exported as Node.js modules.
Installation
Using npm:
$ npm i -g npm
$ npm i --save lodash
In Node.js:
// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');
// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');
See the package source for more details.
Note:
Install n_ for Lodash use in the Node.js < 6 REPL.
Support
Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.
Automated browser & CI test runs are available.
react
Author: Unknown
Description: React is a JavaScript library for building user interfaces.
Homepage: https://reactjs.org/
Created | almost 8 years ago |
Last Updated | 9 days ago |
License | MIT |
Maintainers | 8 |
Releases | 220 |
Direct Dependencies | loose-envify , object-assign and prop-types |
Keywords | react |
react-dom
Author: Unknown
Description: React package for working with the DOM.
Homepage: https://reactjs.org/
Created | over 5 years ago |
Last Updated | 9 days ago |
License | MIT |
Maintainers | 9 |
Releases | 175 |
Direct Dependencies | loose-envify , object-assign , prop-types and scheduler |
Keywords | react |
react-router-dom
Author: Unknown
Description: DOM bindings for React Router
Homepage: https://github.com/ReactTraining/react-router#readme
Created | almost 3 years ago |
Last Updated | 1 day ago |
License | MIT |
Maintainers | 2 |
Releases | 35 |
Direct Dependencies | @babel/runtime , history , loose-envify , prop-types , react-router , tiny-invariant and tiny-warning |
Keywords | react, router, route, routing, history and link |
README
react-router-dom
DOM bindings for React Router.
Installation
Using npm:
$ npm install --save react-router-dom
Then with a module bundler like webpack, use as you would anything else:
// using ES6 modules
import { BrowserRouter, Route, Link } from "react-router-dom";
// using CommonJS modules
const BrowserRouter = require("react-router-dom").BrowserRouter;
const Route = require("react-router-dom").Route;
const Link = require("react-router-dom").Link;
The UMD build is also available on unpkg:
<script src="https://unpkg.com/react-router-dom/umd/react-router-dom.min.js"></script>
You can find the library on window.ReactRouterDOM
.
Issues
If you find a bug, please file an issue on our issue tracker on GitHub.
Credits
React Router is built and maintained by React Training.
@42.nl/react-error-store
Author: Maarten Hus
Description: Storing errors and listening to their changes.
Homepage: https://github.com/42BV/react-error-store#readme
Created | 3 months ago |
Last Updated | 6 days ago |
License | ISC |
Maintainers | 3 |
Releases | 3 |
Direct Dependencies | lodash.get and lodash.set |
Keywords | Error and React |
README
About
Storing errors and listening to their changes.
Installation
npm install @42.nl/react-error-store --save
Documentation
See the documentation.
Developing
When developing a new feature, make sure you do not update the package.json
's
version this will happen whenever a release is made on master
by
the releasers.
Create a PR to submit your changes to the master branch, the maintainers
will review your work and decide if the feature warrented or if the
bug is vaporized.
Releasing
Drafting a new release is as simple as running npm run release
. This command runs (https://github.com/sindresorhus/np)[np] under the hood, which will guide you through the process of drafting a release.
A checklist for after the release:
- [] Make sure a tag is created in GitHub
- [] Make sure the release is created in GitHub.
- [] Make sure the release is on NPM.
reactstrap
Author: Unknown
Description: React Bootstrap 4 components
Homepage: https://github.com/reactstrap/reactstrap#readme
Created | over 3 years ago |
Last Updated | 3 months ago |
License | MIT |
Maintainers | 3 |
Releases | 110 |
Direct Dependencies | @babel/runtime , classnames , lodash.isfunction , lodash.isobject , lodash.tonumber , prop-types , react-lifecycles-compat , react-popper and react-transition-group |
Keywords | reactstrap, bootstrap, react, component, components, react-component and ui |
@42.nl/spring-connect
Author: Maarten Hus
Description: Connecting with a Spring REST APIs in a domain friendly manner
Homepage: https://github.com/42BV/mad-spring-connect#readme
Created | about 2 months ago |
Last Updated | 14 days ago |
License | ISC |
Maintainers | 3 |
Releases | 7 |
Direct Dependencies | lodash.merge and query-string |
Keywords | REST, fetch and Spring |
README
About
This library makes it easy to create Resource to connect to a Spring MVC back-end.
Installation
npm install @42.nl/spring-connect --save
Documentation
See the documentation
sass
Author: Natalie Weizenbaum
Description: A pure JavaScript implementation of Sass.
Homepage: https://github.com/sass/dart-sass
Created | over 2 years ago |
Last Updated | 14 days ago |
License | MIT |
Maintainers | 5 |
Releases | 80 |
Direct Dependencies | chokidar |
Keywords | style, scss, sass, preprocessor and css |
README
A pure JavaScript implementation of Sass. Sass makes CSS fun again.
|
This package is a distribution of Dart Sass, compiled to pure JavaScript
with no native code or external dependencies. It provides a command-line sass
executable and a Node.js API.
Usage
You can install Sass globally using npm install -g sass
which will provide
access to the sass
executable. You can also add it to your project using
npm install --save-dev sass
. This provides the executable as well as a
library:
var sass = require('sass');
sass.render({file: scss_filename}, function(err, result) { /* ... */ });
// OR
var result = sass.renderSync({file: scss_filename});
See below for details on Dart Sass's JavaScript API.
API
When installed via npm, Dart Sass supports a JavaScript API that's fully
compatible with Node Sass (with a few exceptions listed below), with support
for both the render()
and renderSync()
functions. See the Sass
website for full API documentation!
Note however that by default, renderSync()
is more than twice as fast as
render()
due to the overhead of asynchronous callbacks. To avoid this
performance hit, render()
can use the fibers
package to call
asynchronous importers from the synchronous code path. To enable this, pass the
Fiber
class to the fiber
option:
var sass = require("sass");
var Fiber = require("fibers");
sass.render({
file: "input.scss",
importer: function(url, prev, done) {
// ...
},
fiber: Fiber
}, function(err, result) {
// ...
});
Both render()
and renderSync()
support the following options:
data
file
functions
importer
includePaths
indentType
indentWidth
indentedSyntax
linefeed
omitSourceMapUrl
outFile
sourceMapContents
sourceMapEmbed
sourceMapRoot
sourceMap
- Only the
"expanded"
and"compressed"
values of
outputStyle
are supported.
No support is intended for the following options:
-
precision
. Dart Sass defaults
to a sufficiently high precision for all existing browsers, and making this
customizable would make the code substantially less efficient. -
sourceComments
. Source
maps are the recommended way of locating the origin of generated selectors.
See Also
-
Dart Sass, from which this package is compiled, can be used either as a
stand-alone executable or as a Dart library. Running Dart Sass on the Dart VM
is substantially faster than running the pure JavaScript version, so this may
be appropriate for performance-sensitive applications. The Dart API is also
(currently) more user-friendly than the JavaScript API. See
the Dart Sass README for details on how to use it. -
Node Sass, which is a wrapper around LibSass, the C++ implementation
of Sass. Node Sass supports the same API as this package and is also faster
(although it's usually a little slower than Dart Sass). However, it requires a
native library which may be difficult to install, and it's generally slower to
add features and fix bugs.
Behavioral Differences from Ruby Sass
There are a few intentional behavioral differences between Dart Sass and Ruby
Sass. These are generally places where Ruby Sass has an undesired behavior, and
it's substantially easier to implement the correct behavior than it would be to
implement compatible behavior. These should all have tracking bugs against Ruby
Sass to update the reference behavior.
-
@extend
only accepts simple selectors, as does the second argument of
selector-extend()
. See issue 1599. -
Subject selectors are not supported. See issue 1126.
-
Pseudo selector arguments are parsed as
<declaration-value>
s rather than
having a more limited custom parsing. See issue 2120. -
The numeric precision is set to 10. See issue 1122.
-
The indented syntax parser is more flexible: it doesn't require consistent
indentation across the whole document. See issue 2176. -
Colors do not support channel-by-channel arithmetic. See issue 2144.
-
Unitless numbers aren't
==
to unit numbers with the same value. In
addition, map keys follow the same logic as==
-equality. See
issue 1496. -
rgba()
andhsla()
alpha values with percentage units are interpreted as
percentages. Other units are forbidden. See issue 1525. -
Too many variable arguments passed to a function is an error. See
issue 1408. -
Allow
@extend
to reach outside a media query if there's an identical
@extend
defined outside that query. This isn't tracked explicitly, because
it'll be irrelevant when issue 1050 is fixed. -
Some selector pseudos containing placeholder selectors will be compiled
where they wouldn't be in Ruby Sass. This better matches the semantics of
the selectors in question, and is more efficient. See issue 2228. -
The old-style
:property value
syntax is not supported in the indented
syntax. See issue 2245. -
The reference combinator is not supported. See issue 303.
-
Universal selector unification is symmetrical. See issue 2247.
-
@extend
doesn't produce an error if it matches but fails to unify. See
issue 2250. -
Dart Sass currently only supports UTF-8 documents. We'd like to support
more, but Dart currently doesn't support them. See dart-lang/sdk#11744,
for example.
Disclaimer: this is not an official Google product.
final-form
Author: Erik Rasmussen
Description: 🏁 Framework agnostic, high performance, subscription-based form state management
Homepage: https://github.com/final-form/final-form#readme
Created | about 2 years ago |
Last Updated | about 1 month ago |
License | MIT |
Maintainers | 1 |
Releases | 63 |
Direct Dependencies | @babel/runtime |
README
💰 Hey there! Do you fancy yourself a javascript expert? Take this quiz and get offers from top tech companies! 💰
🏁 Final Form
✅ Zero dependencies *
✅ Framework agnostic
✅ Opt-in subscriptions - only update on the state you need!
✅ 💥 5.1k gzipped 💥
💬 Give Feedback on Final Form 💬
In the interest of making 🏁 Final Form the best library it can be, we'd love your thoughts and feedback.
Get Started
Philosophy
Examples
API
Companion Libraries
Who's using Final Form?
Codecov Report
@@ Coverage Diff @@
## master #100 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 46 46
Lines 1117 1117
Branches 201 201
=====================================
Hits 1117 1117 Continue to review full report at Codecov.
|
Added more libraries which are common to 42 projects to the
peerDependencies
list as well as included them to thedevDependencies
list. This is due to issues with out-of-sync dependencies being used by
@42.nl/ui
in conjunction to most of the internal 42 projects.In addition this commit also resolves most of the
peerDependency
warnings of the included dependencies.
The remaining
peerDependency
warnings are the following: