]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[tests] Get TS tests working on Windows with cross-env (#5519)
authorAlan Wang <wp_scut@163.com>
Wed, 20 May 2020 06:29:31 +0000 (14:29 +0800)
committerGitHub <noreply@github.com>
Wed, 20 May 2020 06:29:31 +0000 (23:29 -0700)
package-lock.json
package.json
src/lib/create/from-string-and-format.js

index 0dadba9b36718ab154b743c87c19bc341f2ced24..2e8172b38cf4bb1e3e6004888f2b07efdaad25c2 100644 (file)
                 "request": "^2.88.2"
             }
         },
+        "cross-env": {
+            "version": "6.0.3",
+            "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz",
+            "integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==",
+            "dev": true,
+            "requires": {
+                "cross-spawn": "^7.0.0"
+            },
+            "dependencies": {
+                "cross-spawn": {
+                    "version": "7.0.2",
+                    "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
+                    "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==",
+                    "dev": true,
+                    "requires": {
+                        "path-key": "^3.1.0",
+                        "shebang-command": "^2.0.0",
+                        "which": "^2.0.1"
+                    }
+                },
+                "path-key": {
+                    "version": "3.1.1",
+                    "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+                    "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+                    "dev": true
+                },
+                "shebang-command": {
+                    "version": "2.0.0",
+                    "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+                    "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+                    "dev": true,
+                    "requires": {
+                        "shebang-regex": "^3.0.0"
+                    }
+                },
+                "shebang-regex": {
+                    "version": "3.0.0",
+                    "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+                    "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+                    "dev": true
+                },
+                "which": {
+                    "version": "2.0.2",
+                    "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+                    "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+                    "dev": true,
+                    "requires": {
+                        "isexe": "^2.0.0"
+                    }
+                }
+            }
+        },
         "cross-spawn": {
             "version": "6.0.5",
             "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
             "dev": true
         },
         "tslib": {
-            "version": "1.11.1",
-            "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
-            "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==",
+            "version": "1.11.2",
+            "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz",
+            "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==",
             "dev": true
         },
         "tunnel-agent": {
index 2d08647b73ff3b8d55db3a78c1613af43ee93ac9..dc5d72c94dfe1f2fe5a6bc55cd7cad46a9f98726 100644 (file)
@@ -46,6 +46,7 @@
     "devDependencies": {
         "benchmark": "latest",
         "coveralls": "latest",
+        "cross-env": "^6.0.3",
         "es6-promise": "latest",
         "eslint": "~6",
         "grunt": "latest",
@@ -91,8 +92,8 @@
         }
     },
     "scripts": {
-        "ts3.1-typescript-test": "node_modules/typescript3/bin/tsc --project ts3.1-typing-tests",
-        "typescript-test": "node_modules/typescript/bin/tsc --project typing-tests",
+        "ts3.1-typescript-test": "cross-env node_modules/typescript3/bin/tsc --project ts3.1-typing-tests",
+        "typescript-test": "cross-env node_modules/typescript/bin/tsc --project typing-tests",
         "test": "grunt test",
         "eslint": "eslint Gruntfile.js tasks src",
         "prettier-check": "prettier --check Gruntfile.js tasks src",
index df55f17050363fdedbbb9bf92ef4ab242e064375..36d9be11e65f366ca38f435980a042563b22513b 100644 (file)
@@ -50,8 +50,6 @@ export function configFromStringAndFormat(config) {
         token = tokens[i];
         parsedInput = (string.match(getParseRegexForToken(token, config)) ||
             [])[0];
-        // console.log('token', token, 'parsedInput', parsedInput,
-        //         'regex', getParseRegexForToken(token, config));
         if (parsedInput) {
             skipped = string.substr(0, string.indexOf(parsedInput));
             if (skipped.length > 0) {