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

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rwu823 committed Jan 12, 2018
2 parents 4f2a37e + b9b491c commit 250cd88
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 92 deletions.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
{
"name": "@17media/dad",
"version": "2.0.1",
"version": "2.0.2",
"repository": "https://github.com/17media/dad.git",
"author": "Rocky Wu <[email protected]>",
"main": "dist/dad.js",
"license": "MIT",
"devDependencies": {
"@17media/eslint-config-17media": "^1.2.0",
"@types/jest": "^22.0.0",
"@types/jest": "^22.0.1",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.1.2",
"babel-eslint": "^8.2.1",
"babel-preset-env": "^1.6.1",
"eslint": "^4.14.0",
"eslint": "^4.15.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-react": "^7.5.1",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
"gulp-size": "^3.0.0",
"gulp-uglify-es": "^0.1.9",
"gulp-uglify-es": "^0.2.0",
"jest": "^22.0.4",
"pump": "^2.0.0",
"rollup": "^0.53.3",
"rollup-plugin-babel": "^3.0.3"
"rollup": "^0.53.4",
"rollup-plugin-babel": "^3.0.3",
"sh-exec": "^0.1.1"
},
"dependencies": {
"ienv": "^1.0.0"
Expand Down
18 changes: 1 addition & 17 deletions scripts/deploy.dev.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
const { exec } = require('child_process');
const sh = require('sh-exec');

const { version, repository } = require('../package.json');

const sh = (tstrings, ...vars) => {
const fork = Array.from(tstrings);

vars.forEach((v, i) => {
fork[i] += v;
});

exec(fork.join(''), (err, stdout, stderr) => {
if (err) {
throw new Error(err);
}

console.log(stderr || stdout);
});
};

const {
TRAVIS_BRANCH,
TRAVIS_MATRIX,
Expand Down
7 changes: 6 additions & 1 deletion src/utils/__tests__/unifyTimeFormat.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import unifyTimeFormat from '../unifyTimeFormat';

describe('unifyTimeFormat spec', () => {
it('change unify time format', () => {
it('transform incomplete time to complete timeformat and replace space with T', () => {
const dateString = '2018-01-01 19:00';
expect(unifyTimeFormat(dateString)).toBe('2018-01-01T19:00:00');
});

it('transform incomplete time to complete timeformat', () => {
const dateString = '2018-01-01';
expect(unifyTimeFormat(dateString)).toBe('2018-01-01T00:00:00');
});
});
2 changes: 1 addition & 1 deletion src/utils/unifyTimeFormat.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import suffix00 from './suffix00';

const unifyTimeFormat = (string = '') => suffix00(string.replace(' ', 'T'));
const unifyTimeFormat = (string = '') => suffix00(string).replace(' ', 'T');

export default unifyTimeFormat;
160 changes: 94 additions & 66 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,61 @@
version "1.2.0"
resolved "https://registry.yarnpkg.com/@17media/eslint-config-17media/-/eslint-config-17media-1.2.0.tgz#24c360d1ec015add2528f3f259771a7988f1f9dc"

"@babel/[email protected]":
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz#473d021ecc573a2cce1c07d5b509d5215f46ba35"
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"

"@babel/code-frame@^7.0.0-beta.35":
"@babel/[email protected]", "@babel/code-frame@^7.0.0-beta.35":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.36.tgz#2349d7ec04b3a06945ae173280ef8579b63728e4"
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"

"@babel/[email protected].31":
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.31.tgz#afe63ad799209989348b1109b44feb66aa245f57"
"@babel/[email protected].36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.36.tgz#366e3bc35147721b69009f803907c4d53212e88d"
dependencies:
"@babel/helper-get-function-arity" "7.0.0-beta.31"
"@babel/template" "7.0.0-beta.31"
"@babel/traverse" "7.0.0-beta.31"
"@babel/types" "7.0.0-beta.31"
"@babel/helper-get-function-arity" "7.0.0-beta.36"
"@babel/template" "7.0.0-beta.36"
"@babel/types" "7.0.0-beta.36"

"@babel/[email protected].31":
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.31.tgz#1176d79252741218e0aec872ada07efb2b37a493"
"@babel/[email protected].36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.36.tgz#f5383bac9a96b274828b10d98900e84ee43e32b8"
dependencies:
"@babel/types" "7.0.0-beta.31"
"@babel/types" "7.0.0-beta.36"

"@babel/[email protected].31":
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.31.tgz#577bb29389f6c497c3e7d014617e7d6713f68bda"
"@babel/[email protected].36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.36.tgz#02e903de5d68bd7899bce3c5b5447e59529abb00"
dependencies:
"@babel/code-frame" "7.0.0-beta.31"
"@babel/types" "7.0.0-beta.31"
babylon "7.0.0-beta.31"
"@babel/code-frame" "7.0.0-beta.36"
"@babel/types" "7.0.0-beta.36"
babylon "7.0.0-beta.36"
lodash "^4.2.0"

"@babel/[email protected].31":
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.31.tgz#db399499ad74aefda014f0c10321ab255134b1df"
"@babel/[email protected].36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.36.tgz#1dc6f8750e89b6b979de5fe44aa993b1a2192261"
dependencies:
"@babel/code-frame" "7.0.0-beta.31"
"@babel/helper-function-name" "7.0.0-beta.31"
"@babel/types" "7.0.0-beta.31"
babylon "7.0.0-beta.31"
"@babel/code-frame" "7.0.0-beta.36"
"@babel/helper-function-name" "7.0.0-beta.36"
"@babel/types" "7.0.0-beta.36"
babylon "7.0.0-beta.36"
debug "^3.0.1"
globals "^10.0.0"
globals "^11.1.0"
invariant "^2.2.0"
lodash "^4.2.0"

"@babel/[email protected].31":
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4"
"@babel/[email protected].36":
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.36.tgz#64f2004353de42adb72f9ebb4665fc35b5499d23"
dependencies:
esutils "^2.0.2"
lodash "^4.2.0"
to-fast-properties "^2.0.0"

"@types/jest@^22.0.0":
version "22.0.0"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.0.0.tgz#23009941178aad7979a9591e026f7a96054d7bc0"
"@types/jest@^22.0.1":
version "22.0.1"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-22.0.1.tgz#6370a6d60cce3845e4cd5d00bf65f654264685bc"

"@types/node@*":
version "8.5.5"
Expand Down Expand Up @@ -402,14 +393,14 @@ babel-core@^6.0.0, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.6"

babel-eslint@^8.1.2:
version "8.1.2"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.1.2.tgz#a39230b0c20ecbaa19a35d5633bf9b9ca2c8116f"
babel-eslint@^8.2.1:
version "8.2.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.1.tgz#136888f3c109edc65376c23ebf494f36a3e03951"
dependencies:
"@babel/code-frame" "7.0.0-beta.31"
"@babel/traverse" "7.0.0-beta.31"
"@babel/types" "7.0.0-beta.31"
babylon "7.0.0-beta.31"
"@babel/code-frame" "7.0.0-beta.36"
"@babel/traverse" "7.0.0-beta.36"
"@babel/types" "7.0.0-beta.36"
babylon "7.0.0-beta.36"
eslint-scope "~3.7.1"
eslint-visitor-keys "^1.0.0"

Expand Down Expand Up @@ -873,9 +864,9 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26
lodash "^4.17.4"
to-fast-properties "^1.0.3"

[email protected].31:
version "7.0.0-beta.31"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.31.tgz#7ec10f81e0e456fd0f855ad60fa30c2ac454283f"
[email protected].36:
version "7.0.0-beta.36"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.36.tgz#3a3683ba6a9a1e02b0aa507c8e63435e39305b9e"

babylon@^6.18.0:
version "6.18.0"
Expand Down Expand Up @@ -1129,10 +1120,18 @@ cliui@^3.2.0:
strip-ansi "^3.0.1"
wrap-ansi "^2.0.0"

clone-buffer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"

clone-stats@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"

clone-stats@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"

clone@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
Expand All @@ -1141,6 +1140,18 @@ clone@^1.0.0, clone@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f"

clone@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb"

cloneable-readable@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117"
dependencies:
inherits "^2.0.1"
process-nextick-args "^1.0.6"
through2 "^2.0.1"

co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
Expand Down Expand Up @@ -1522,9 +1533,9 @@ eslint-visitor-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"

eslint@^4.14.0:
version "4.14.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.14.0.tgz#96609768d1dd23304faba2d94b7fefe5a5447a82"
eslint@^4.15.0:
version "4.15.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.15.0.tgz#89ab38c12713eec3d13afac14e4a89e75ef08145"
dependencies:
ajv "^5.3.0"
babel-code-frame "^6.22.0"
Expand Down Expand Up @@ -2060,11 +2071,7 @@ global-prefix@^1.0.1:
is-windows "^1.0.1"
which "^1.2.14"

globals@^10.0.0:
version "10.4.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7"

globals@^11.0.1:
globals@^11.0.1, globals@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4"

Expand Down Expand Up @@ -2131,12 +2138,14 @@ gulp-size@^3.0.0:
stream-counter "^1.0.0"
through2 "^2.0.0"

gulp-uglify-es@^0.1.9:
version "0.1.9"
resolved "https://registry.yarnpkg.com/gulp-uglify-es/-/gulp-uglify-es-0.1.9.tgz#4d83c30ec6d2343d66b61703e1d301144a21f0f7"
gulp-uglify-es@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/gulp-uglify-es/-/gulp-uglify-es-0.2.0.tgz#fb346d9aedb375e53af984a5dcfb27c019495f1b"
dependencies:
o-stream "^0.2.2"
plugin-error "^0.1.2"
uglify-es "^3.2.0"
vinyl "^2.1.0"
vinyl-sourcemaps-apply "^0.2.1"

gulp-util@^3.0.0:
Expand Down Expand Up @@ -3891,7 +3900,7 @@ private@^0.1.6, private@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"

process-nextick-args@~1.0.6:
process-nextick-args@^1.0.6, process-nextick-args@~1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"

Expand Down Expand Up @@ -4109,6 +4118,10 @@ [email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"

replace-ext@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"

[email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6"
Expand Down Expand Up @@ -4249,9 +4262,9 @@ rollup-pluginutils@^1.5.0:
estree-walker "^0.2.1"
minimatch "^3.0.2"

rollup@^0.53.3:
version "0.53.3"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.53.3.tgz#e7b6777623df912bd0ca30dc24be791d6ebc8e5a"
rollup@^0.53.4:
version "0.53.4"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.53.4.tgz#f92ce56ee1d097ad5b6f13951bc80db5fef18113"

run-async@^2.2.0:
version "2.3.0"
Expand Down Expand Up @@ -4339,6 +4352,10 @@ setimmediate@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"

sh-exec@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/sh-exec/-/sh-exec-0.1.1.tgz#d5e2595466546cf2ebeb92ad2b7ae10bc91299c7"

shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
Expand Down Expand Up @@ -4665,7 +4682,7 @@ through2@^0.6.1:
readable-stream ">=1.0.33-1 <1.1.0-0"
xtend ">=4.0.0 <4.1.0-0"

through2@^2.0.0:
through2@^2.0.0, through2@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
dependencies:
Expand Down Expand Up @@ -4899,6 +4916,17 @@ vinyl@^0.5.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"

vinyl@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
dependencies:
clone "^2.1.1"
clone-buffer "^1.0.0"
clone-stats "^1.0.0"
cloneable-readable "^1.0.0"
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"

walker@~1.0.5:
version "1.0.7"
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
Expand Down

0 comments on commit 250cd88

Please sign in to comment.