Skip to content

Commit

Permalink
Merge branch 'newdev' into develop
Browse files Browse the repository at this point in the history
* newdev: (671 commits)
  Re-implement based from v3.2.4 - fix issue yyyy case sensitive / unexpected TODO from year selector
  v3.2.4
  Restore support of lib instnace (mui#1281)
  Fix ts error and formik example (mui#1280)
  v3.2.3
  Update patrons list
  Add mention of renamed `moment` property (mui#1268)
  [a11y] Open picker by space click (mui#1266)
  Do not allow input any chars when value is nul (mui#1265)
  Dispatch onChange before onClose (mui#1264)
  Refactor wrapping <Picker /> in state to be 1 component (mui#1263)
  [InlineWrapper]: Don't force any width on the paper (mui#1248) (mui#1261)
  Remove direct `@material-ui/core` imports. (mui#1252)
  [docs] Fix typo in date-fns localization title
  Fix direct @material-ui/core imports (mui#1236)
  Update prop-types.json
  Ovveride keyboard datepicker onChange date type
  [docs] Show DateIOType instead of anys  (mui#1228)
  Update release script
  v3.2.2
  ...

# Conflicts:
#	README.md
#	docs/src/Examples/Demo/DatePicker/BasicDatePicker.jsx
#	docs/src/Examples/Demo/DatePicker/InlineDatePicker.jsx
#	docs/src/Examples/Demo/DateTimePicker/BasicDateTimePicker.jsx
#	docs/src/Examples/Demo/DateTimePicker/InlineDateTimePicker.jsx
#	lib/package.json
#	lib/src/DatePicker/DatePicker.jsx
#	lib/src/DatePicker/DatePickerInline.jsx
#	lib/src/DatePicker/DatePickerModal.jsx
#	lib/src/DatePicker/components/Calendar.jsx
#	lib/src/DatePicker/components/CalendarHeader.jsx
#	lib/src/DatePicker/components/YearSelection.jsx
#	lib/src/DateTimePicker/DateTimePicker.jsx
#	lib/src/DateTimePicker/DateTimePickerInline.jsx
#	lib/src/DateTimePicker/DateTimePickerModal.jsx
#	lib/src/DateTimePicker/components/DateTimePickerHeader.jsx
#	lib/src/_shared/DateTextField.jsx
  • Loading branch information
kizzetipong committed Aug 30, 2019
2 parents 8a74dc5 + db926c3 commit ce05328
Show file tree
Hide file tree
Showing 601 changed files with 36,660 additions and 41,690 deletions.
142 changes: 142 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
####################
# Defaults
####################
defaults: &js_defaults
docker:
- image: circleci/node:lts
environment:
## this enables colors in the output
TERM: xterm
working_directory: ~/material-ui-pickers

version: 2.1
orbs:
cypress: cypress-io/[email protected]

####################
# Custom jobs
####################
jobs:
checkout_code:
<<: *js_defaults
steps:
- checkout
- persist_to_workspace:
root: .
paths: .

javascript:
<<: *js_defaults
steps:
- attach_workspace:
at: .
- restore_cache:
name: Restore Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache

- run:
name: Typescript
command: yarn workspaces run build:typescript
- run:
name: Eslint
command: yarn lint
- run:
name: Ensure prettier was run
command: yarn prettier --check './**/*.ts*' './**/*.js*'
- run:
name: Build and analyze bundlesize
command: yarn workspace @material-ui/pickers build:analyze

- persist_to_workspace:
root: .
paths: .

jest_tests:
description: Running jest test with separate library
parameters:
lib:
description: "Library to run tests"
type: string
after-tests:
description: "Steps that will be executed after test run is finished"
type: steps
default: []
<<: *js_defaults
steps:
- attach_workspace:
at: .
# --runInBand required to not get out of memory @see https://discuss.circleci.com/t/memory-problems-with-jest-and-workers/10297
- run: cd lib && yarn test:<<parameters.lib>> -- -- --runInBand
- steps: << parameters.after-tests >>

cypress_tests:
description: Run cypress tests
executor: cypress/browsers-chrome69
steps:
- attach_workspace:
at: .
- restore_cache:
name: Restore Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Additional yarn install
command: yarn install --frozen-lockfile
- run:
name: Install, if no cypress binary found
command: yarn cypress install
- run: yarn workspace docs build
- run:
background: true
name: Run docs in background
command: yarn workspace docs start
environment:
VISUAL_TESTING: true
- run: npx wait-on http://localhost:3000
- run: yarn percy exec -- cypress run --record

####################
# Workflow
####################
workflows:
build_and_test:
jobs:
- checkout_code
- javascript:
name: 'Install deps, lint and build'
requires:
- checkout_code

- cypress_tests:
name: 'Cypress tests'
requires:
- checkout_code

- jest_tests:
name: 'Date-fns jest tests'
lib: date-fns
after-tests:
- run: npx codecov
requires:
- 'Install deps, lint and build'

- jest_tests:
name: 'Moment jest tests'
lib: moment
requires:
- 'Install deps, lint and build'

- jest_tests:
name: 'Luxon jest tests'
lib: luxon
requires:
- 'Install deps, lint and build'
41 changes: 41 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
plugins: ['react', 'react-hooks', 'pretty-imports', '@typescript-eslint'],
rules: {
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-explicit-any': 0,
// in scripts and config files it's required to use dynamic require
'@typescript-eslint/no-var-requires': 0,
'react/no-children-prop': 0,
'react/jsx-uses-vars': 2,
'react/jsx-uses-react': 2,
'pretty-imports/sorted': 'warn',
'@typescript-eslint/no-use-before-define': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', argsIgnorePattern: '^_', ignoreRestSiblings: true },
],
},
};
8 changes: 8 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: dmtrKovalenko
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL
38 changes: 23 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
---
name: Bug report
about: Create a report to help us improve

title: ''
labels: ''
assignees: ''
---

<!-- Thanks so much for your time taking to open an issue, your work is appreciated! ❤️ -->

<!-- If you don't mind add a fun gif or meme, but no pressure -->

![A GIF or MEME to give some spice of the internet](url)

## Environment

| Tech | Version |
|---------------------|---------|
| material-ui-pickers | |
| material-ui | |
| React | |
| Browser | |
| Peer library | | <!-- date-fns, luxon or moment and version -->
| Tech | Version |
| -------------------- | ------- |
| @material-ui/pickers | |
| material-ui | |
| React | |
| Browser | |
| Peer library | | <!-- date-fns, luxon or moment and version --> |

## Steps to reproduce
1.
2.
3.

1. 2. 3.

## Expected behavior

<!-- What behavior do you expect? -->

## Actual behavior

<!-- What behavior do you see? -->

## Live example

<!--
Live examples help us to investigate bugs and save our time.
Please try to make this example as simple as possible.
To create an example you can use this playground:
https://codesandbox.io/s/6wxqo5mxnz
Live examples help us to investigate bugs and save our time.
Please try to make this example as simple as possible.
To create an example you can fork this playground:
https://codesandbox.io/s/o7oojxx1pq
-->
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

<!-- If you don't mind add a fun gif or meme, but no pressure -->
![A GIF or MEME to give some spice of the internet](url)

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Expand Down
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# dependencies
*/node_modules
node_modules

# build
dist
Expand All @@ -10,18 +10,22 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.firebase/
.env

# coverage
coverage

# Optional npm cache directory
# Cache directory
.npm
cypress
.next

# Optional eslint cache
.eslintcache

# dotenv environment variables file
.env
.env.local

# webstorm
.idea/
Expand All @@ -30,5 +34,4 @@ coverage

# editors
.vs
.vscode
.DS_Store
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node-modules/
build/
coverage/
*.mp4
.next
docs/prop-types.json
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 100
}
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFoler}"
}
]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"cSpell.words": ["Formik", "Notistack", "Sourcable", "patreon"],
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],
"typescript.tsdk": "node_modules/typescript/lib",
"javascript.implicitProjectConfig.checkJs": true
}
Loading

0 comments on commit ce05328

Please sign in to comment.