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

Framework: Use key-mirror in place of react/lib/keyMirror #776

Merged
merged 1 commit into from
Nov 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1213,3 +1213,16 @@ The above copyright notice and this permission notice shall be included in all c

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```

### https://github.com/wmira/key-mirror
```text
The MIT License (MIT)

Copyright (c) 2015 Warren Mira

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
4 changes: 2 additions & 2 deletions client/lib/comment-like-store/constants.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
LIKE_COMMENT: null,
UNLIKE_COMMENT: null,
RECEIVE_COMMENT_LIKE_RESPONSE: null,
RECEIVE_COMMENT_UNLIKE_RESPONSE: null,
} );
} );
4 changes: 2 additions & 2 deletions client/lib/comment-store/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
ADD_COMMENT: null,
Expand All @@ -13,4 +13,4 @@ module.exports.state = keyMirror( {
PENDING: null,
COMPLETE: null,
ERROR: null,
} );
} );
2 changes: 1 addition & 1 deletion client/lib/domains/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.type = keyMirror( {
MAPPED: null,
Expand Down
2 changes: 1 addition & 1 deletion client/lib/dss/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

/**
* Module variables
Expand Down
2 changes: 1 addition & 1 deletion client/lib/feed-post-store/constants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports = { action: keyMirror( { FETCH_FEED_POST: null, RECEIVE_FEED_POST: null } ) };
2 changes: 1 addition & 1 deletion client/lib/happiness-engineers/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
SET_HAPPPINESS_ENGINEERS: null
Expand Down
2 changes: 1 addition & 1 deletion client/lib/help-search/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
SET_HELP_LINKS: null
Expand Down
2 changes: 1 addition & 1 deletion client/lib/invites/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

/**
* Module variables
Expand Down
2 changes: 1 addition & 1 deletion client/lib/media/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

/**
* An enum set of possible media validation errors.
Expand Down
2 changes: 1 addition & 1 deletion client/lib/oauth-store/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

module.exports = {
actions: keyMirror( {
Expand Down
2 changes: 1 addition & 1 deletion client/lib/olark-store/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

/**
* Module variables
Expand Down
2 changes: 1 addition & 1 deletion client/lib/reader-comment-email-subscriptions/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
SUBSCRIBE_TO_COMMENT_EMAILS: null,
Expand Down
2 changes: 1 addition & 1 deletion client/lib/reader-feed-subscriptions/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
FOLLOW_READER_FEED: null,
Expand Down
2 changes: 1 addition & 1 deletion client/lib/reader-post-email-subscriptions/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
SUBSCRIBE_TO_POST_EMAILS: null,
Expand Down
2 changes: 1 addition & 1 deletion client/lib/reader-site-blocks/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
BLOCK_SITE: null,
Expand Down
4 changes: 2 additions & 2 deletions client/lib/reader-teams/constants.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
RECEIVE_TEAMS: null,
} );

module.exports.error = keyMirror( {
UNABLE_TO_RECEIVE_TEAMS: null
} );
} );
2 changes: 1 addition & 1 deletion client/lib/security-checkup/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion client/lib/terms/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// External Dependencies
var keyMirror = require( 'react/lib/keyMirror' );
var keyMirror = require( 'key-mirror' );

module.exports.MAX_TAGS = 1000;
module.exports.MAX_TAGS_SUGGESTIONS = 20;
Expand Down
2 changes: 1 addition & 1 deletion client/lib/upgrades/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const keyMirror = require( 'react/lib/keyMirror' );
const keyMirror = require( 'key-mirror' );

module.exports.action = keyMirror( {
ADD_CART_ITEM: null,
Expand Down
2 changes: 1 addition & 1 deletion client/me/security-checkup/manage-contact.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
var React = require( 'react' ),
keyMirror = require( 'react/lib/keyMirror' ),
keyMirror = require( 'key-mirror' ),
assign = require( 'lodash/object/assign' );

/**
Expand Down
2 changes: 1 addition & 1 deletion client/post-editor/media-modal/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

export const Views = keyMirror( {
LIST: null,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"jed": "1.0.2",
"json-loader": "0.5.1",
"jstimezonedetect": "1.0.5",
"key-mirror": "1.0.1",
"keymaster": "1.6.2",
"lodash": "3.10.1",
"lunr": "0.5.7",
Expand Down Expand Up @@ -89,8 +90,8 @@
"walk": "2.3.4",
"webpack": "1.12.6",
"webpack-dev-middleware": "1.2.0",
"wpcom-unpublished": "1.0.5",
"wpcom-proxy-request": "1.0.5",
"wpcom-unpublished": "1.0.5",
"wpcom-xhr-request": "0.3.3",
"xgettext-js": "0.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion shared/lib/screen-title/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import keyMirror from 'react/lib/keyMirror';
import keyMirror from 'key-mirror';

const actionTypes = keyMirror( {
SET_TITLE: null,
Expand Down
2 changes: 1 addition & 1 deletion shared/lib/themes/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
var assign = require( 'lodash/object/assign' ),
keyMirror = require( 'react/lib/keyMirror' );
keyMirror = require( 'key-mirror' );

module.exports = assign( keyMirror( {

Expand Down