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

Commit

Permalink
Merge pull request #233 from Staffbase/dependabot/npm_and_yarn/nanoid…
Browse files Browse the repository at this point in the history
…-3.1.23

⬆️ Bump nanoid from 2.1.11 to 3.1.23
  • Loading branch information
MarvinZeising authored Dec 1, 2021
2 parents 8503189 + 2513958 commit 717779e
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 50 deletions.
21 changes: 9 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
"sourceType": "module"
},
"env": {
"node": true
Expand All @@ -15,10 +15,7 @@
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": [
"react",
"prettier"
],
"plugins": ["react", "prettier"],
"rules": {
"prettier/prettier": "error",
"react/jsx-uses-react": "error",
Expand All @@ -32,22 +29,22 @@
"react": {
"createClass": "createReactClass", // Regex for Component Factory to use,
// default to "createReactClass"
"pragma": "React", // Pragma to use, default to "React"
"pragma": "React", // Pragma to use, default to "React"
"version": "detect" // React version. "detect" automatically picks the version you have installed.
},
"propWrapperFunctions": [
// The names of any function used to wrap propTypes, e.g. `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
"forbidExtraProps",
{"property": "freeze", "object": "Object"},
{"property": "myFavoriteWrapper"}
{ "property": "freeze", "object": "Object" },
{ "property": "myFavoriteWrapper" }
],
"linkComponents": [
// Components used as alternatives to <a> for linking, eg. <Link to={ url } />
"Hyperlink",
{"name": "Link", "linkAttribute": "to"}
{ "name": "Link", "linkAttribute": "to" }
]
},
"globals": {
"VERSION": "readonly"
}
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ yarn-error.log
.webpack

.DS_Store
*.iml
*.iml
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"lodash.throttle": "^4.1.1",
"menubar": "^9.1.0",
"mousetrap": "^1.6.5",
"nanoid": "^2.1.11",
"nanoid": "^3.1.23",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-redux": "^7.1.3",
Expand All @@ -52,7 +52,6 @@
"@types/dompurify": "^2.0.1",
"@types/lodash.throttle": "^4.1.6",
"@types/mousetrap": "^1.6.3",
"@types/nanoid": "^2.1.0",
"@types/react": "^17.0.15",
"@types/react-dom": "^16.9.6",
"@types/react-redux": "^7.1.7",
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
--textLight: #666;
--textDark: #999;
--textInput: #000;
--logo: url('./assets/iconDark.png');
--logo: url("./assets/iconDark.png");
}

@media (prefers-color-scheme: dark) {
Expand All @@ -42,7 +42,7 @@ limitations under the License.
--textLight: #ddd;
--textDark: #444;
--textInput: #fff;
--logo: url('./assets/icon.png');
--logo: url("./assets/icon.png");
}
}

Expand All @@ -53,5 +53,6 @@ limitations under the License.
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
2 changes: 1 addition & 1 deletion src/renderer/components/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const DAYS = [
"Thursday",
"Friday",
"Saturday",
"Sunday"
"Sunday",
];

function getLastDayOfMonth(month: number): number {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import React, {
useState,
useCallback,
KeyboardEvent,
ChangeEvent
ChangeEvent,
} from "react";
import { useDispatch } from "react-redux";
import { addItem } from "../store/Actions";
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const List = (): ReactElement => {
.replace(
MENTION_REGEX,
(str: string) => `<em class="mention">${str}</em>`
)
),
}}
/>
</StyledListItem>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<body>
<div id="app"></div>
</body>
</html>
</html>
10 changes: 5 additions & 5 deletions src/renderer/store/Actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export enum ActionTypes {
ADD_ITEM,
UPDATE_ITEM,
REMOVE_ITEM,
SET_FILTER
SET_FILTER,
}

export interface ActionPayload<T> {
Expand All @@ -31,21 +31,21 @@ export interface ActionPayload<T> {
export const addItem = (data: PartialItem): ActionPayload<PartialItem> => {
return {
type: ActionTypes.ADD_ITEM,
data
data,
};
};

export const updateItem = (data: Item): ActionPayload<Item> => {
return {
type: ActionTypes.UPDATE_ITEM,
data
data,
};
};

export const removeItem = (data: Item): ActionPayload<Item> => {
return {
type: ActionTypes.REMOVE_ITEM,
data
data,
};
};

Expand All @@ -55,6 +55,6 @@ export const setFilter = (
): ActionPayload<DateFilter> => {
return {
type: ActionTypes.SET_FILTER,
data: { from, to }
data: { from, to },
};
};
2 changes: 1 addition & 1 deletion src/renderer/store/Migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Migrations = {
state.data[id] = {
...state.data[id],
hashtags: extractHashtags(state.data[id].label),
mentions: extractMentions(state.data[id].label)
mentions: extractMentions(state.data[id].label),
};
}

Expand Down
18 changes: 9 additions & 9 deletions src/renderer/store/Reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ limitations under the License.
import { PartialItem, StoreState, DateFilter } from "./Types";
import { ActionPayload, ActionTypes } from "./Actions";
import { Reducer } from "redux";
import nanoid from "nanoid";
import { nanoid } from "nanoid";
import { extractHashtags, extractMentions } from "../utils";

const DEFAULT_STATE = {
data: {},
total: 0,
filter: {
from: 0,
to: 0
}
to: 0,
},
};

export const reducer: Reducer<
Expand All @@ -49,13 +49,13 @@ export const reducer: Reducer<
createdAt: new Date().getTime(),
id: id,
hashtags: extractHashtags(action.data.label),
mentions: extractMentions(action.data.label)
mentions: extractMentions(action.data.label),
};

return {
...state,
data,
total: Object.keys(data).length
total: Object.keys(data).length,
};

case ActionTypes.UPDATE_ITEM:
Expand All @@ -69,12 +69,12 @@ export const reducer: Reducer<
data[id] = Object.assign({}, data[id], {
...action.data,
hashtags: extractHashtags(action.data.label),
mentions: extractMentions(action.data.label)
mentions: extractMentions(action.data.label),
});

return {
...state,
data
data,
};

case ActionTypes.REMOVE_ITEM:
Expand All @@ -89,7 +89,7 @@ export const reducer: Reducer<

return {
...state,
data
data,
};

case ActionTypes.SET_FILTER:
Expand All @@ -99,7 +99,7 @@ export const reducer: Reducer<

return {
...state,
filter: action.data as DateFilter
filter: action.data as DateFilter,
};

default:
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/typings/files.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

declare module '*.png';
declare module "*.png";
15 changes: 4 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -660,13 +660,6 @@
resolved "https://registry.yarnpkg.com/@types/mousetrap/-/mousetrap-1.6.3.tgz#3159a01a2b21c9155a3d8f85588885d725dc987d"
integrity sha512-13gmo3M2qVvjQrWNseqM3+cR6S2Ss3grbR2NZltgMq94wOwqJYQdgn8qzwDshzgXqMlSUtyPZjysImmktu22ew==

"@types/nanoid@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/nanoid/-/nanoid-2.1.0.tgz#41edfda78986e9127d0dc14de982de766f994020"
integrity sha512-xdkn/oRTA0GSNPLIKZgHWqDTWZsVrieKomxJBOQUK9YDD+zfSgmwD5t4WJYra5S7XyhTw7tfvwznW+pFexaepQ==
dependencies:
"@types/node" "*"

"@types/node@*", "@types/node@>= 8":
version "13.7.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.7.tgz#1628e6461ba8cc9b53196dfeaeec7b07fa6eea99"
Expand Down Expand Up @@ -5021,10 +5014,10 @@ nan@^2.12.1, nan@^2.4.0:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==

nanoid@^2.1.11:
version "2.1.11"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280"
integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==
nanoid@^3.1.23:
version "3.1.23"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81"
integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==

nanomatch@^1.2.9:
version "1.2.13"
Expand Down

0 comments on commit 717779e

Please sign in to comment.