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

chore: Some tests while upgrading #997

Open
wants to merge 2 commits into
base: chore/upgrade-to-newest-node-lts
Choose a base branch
from
Open
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
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
"engines": {
"node": "^20.17.0"
},
"resolutions": {
"@babel/core": "^7.16.0"
},
"dependencies": {
"@babel/core": "^7.16.0",
"@bity/oauth2-auth-code-pkce": "^2.13.0",
"aos": "^2.3.4",
"bowser": "^2.11.0",
"classnames": "^2.5.1",
"date-fns": "^4.1.0",
"crypto": "npm:crypto-browserify",
"date-fns": "^2.16.1",
"dropbox": "10.34.0",
"immutable": "^4.3.7",
"lodash": "^4.17.21",
"path": "npm:path-browserify",
"pegjs": "^0.10.0",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
Expand All @@ -24,19 +30,19 @@
"react-motion": "^0.5.2",
"react-redux": "^9.1.2",
"react-router-dom": "5.2.0",
"react-scripts": "5.0.1",
"react-scripts": "4.0.3",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0",
"redux-undo": "1.1.0",
"crypto": "npm:crypto-browserify",
"sass": "^1.80.6",
"stream": "npm:stream-browserify",
"vm": "npm:vm-browserify",
"path": "npm:path-browserify",
"util": "npm:util",
"vm": "npm:vm-browserify",
"vm-browserify": "^1.1.2",
"webdav": "^3.3.0"
},
"scripts": {
"start": "./bin/compile_search_parser.sh && react-scripts start",
"start": "./bin/compile_search_parser.sh && NODE_OPTIONS=--openssl-legacy-provider react-scripts start",
"build": "./bin/compile_search_parser.sh && react-scripts build",
"test:dbg": "./bin/compile_search_parser.sh && react-scripts --inspect-brk test --runInBand --no-cache",
"test": "./bin/compile_search_parser.sh && react-scripts test --env=jsdom",
Expand All @@ -53,7 +59,7 @@
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "16.0.1",
"eslint": "^9.11.0",
"eslint": "^7.32.0",
"eslint-nibble": "^8.1.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-react": "^7.36.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/OrgFile/components/AgendaModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import {
startOfWeek,
startOfMonth,
getDaysInMonth,
format,
} from 'date-fns';
import format from 'date-fns/format';

// INFO: SearchModal, AgendaModal and TaskListModal are very similar
// in structure and partially in logic. When changing one, consider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import './stylesheet.css';

import { customFormatDistanceToNow } from '../../../../lib/org_utils';
import { format } from 'date-fns';
import format from 'date-fns/format';

export default ({ lastServerModifiedAt, lastSyncAt, path, onPull, onPush, onCancel }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import { renderAsText } from '../../../../../../lib/timestamps';
import { getSelectedHeader } from '../../../../../../lib/org_utils';

import _ from 'lodash';
import { parseISO, format } from 'date-fns';
import { parseISO } from 'date-fns';
import format from 'date-fns/format';

class TimestampEditor extends PureComponent {
constructor(props) {
Expand Down Expand Up @@ -322,8 +323,16 @@ class TimestampEditor extends PureComponent {
</>
);
}
const { isActive, year, month, day, startHour, startMinute, endHour, endMinute } =
timestamp.toJS();
const {
isActive,
year,
month,
day,
startHour,
startMinute,
endHour,
endMinute,
} = timestamp.toJS();
return (
<div>
<div className="timestamp-editor__render">{renderAsText(timestamp)}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import './stylesheet.css';
import TimestampEditor from './components/TimestampEditor';

import _ from 'lodash';
import { format } from 'date-fns';
import format from 'date-fns/format';
import { Map } from 'immutable';

export default class TimestampEditorModal extends PureComponent {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/capture_template_substitution.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Map } from 'immutable';
import { format } from 'date-fns';
import format from 'date-fns/format';
import _ from 'lodash';

export default (templateString, customVariables = Map()) => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/org_utils.unit.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import readFixture from '../../test_helpers/index';
import { parseOrg } from './parse_org.js';
import { fromJS } from 'immutable';
import format from 'date-fns';
import format from 'date-fns/format';

import {
extractAllOrgProperties,
Expand Down
Loading