Fix CI instability when building Typescript

The error appears to happen when symlinking typing files and manifests
on case sensitive file systems (like windows) with the error:
```
lib/actions-oclif/env/add.ts(73,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags'. This is likely not portable. A type annotation is necessary.
lib/actions-oclif/version.ts(42,16): error TS2742: The inferred type of 'flags' cannot be named without a reference to '../../../../../../../../volumes/live/c64feead-f78e-4bd4-742d-ccd29aef53c4/volume/node_modules/@oclif/parser/lib/flags.js'. This is likely not portable. A type annotation is necessary.
```

This appears to be reported on the Typescript repo here https://github.com/microsoft/TypeScript/issues/29221
The suggested workaround is to explicitly set the type of the `flags` static
property.

Change-type: patch
Signed-off-by: Lucian <lucian.buzzo@gmail.com>
This commit is contained in:
Lucian 2019-08-09 09:06:17 +01:00
parent 13610ef814
commit 05d58d8248
3 changed files with 9 additions and 8 deletions

View File

@ -70,7 +70,7 @@ export default class EnvAddCmd extends Command {
public static usage = public static usage =
'env add ' + new CommandHelp({ args: EnvAddCmd.args }).defaultUsage(); 'env add ' + new CommandHelp({ args: EnvAddCmd.args }).defaultUsage();
public static flags = { public static flags: flags.Input<FlagsDef> = {
application: flags.string({ application: flags.string({
char: 'a', char: 'a',
description: 'application name', description: 'application name',

View File

@ -21,6 +21,7 @@ import { stripIndent } from 'common-tags';
interface FlagsDef { interface FlagsDef {
all?: boolean; all?: boolean;
json?: boolean; json?: boolean;
help: void;
} }
export default class VersionCmd extends Command { export default class VersionCmd extends Command {
@ -39,7 +40,7 @@ export default class VersionCmd extends Command {
public static usage = 'version'; public static usage = 'version';
public static flags = { public static flags: flags.Input<FlagsDef> = {
all: flags.boolean({ all: flags.boolean({
char: 'a', char: 'a',
default: false, default: false,

12
npm-shrinkwrap.json generated
View File

@ -377,15 +377,15 @@
"integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w=="
}, },
"@types/chai": { "@types/chai": {
"version": "4.1.7", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.7.tgz", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.0.tgz",
"integrity": "sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA==", "integrity": "sha512-zw8UvoBEImn392tLjxoavuonblX/4Yb9ha4KBU10FirCfwgzhKO0dvyJSF9ByxV1xK1r2AgnAi/tvQaLgxQqxA==",
"dev": true "dev": true
}, },
"@types/chai-as-promised": { "@types/chai-as-promised": {
"version": "7.1.1", "version": "7.1.2",
"resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.1.tgz", "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.2.tgz",
"integrity": "sha512-dberBxQW/XWv6BMj0su1lV9/C9AUx5Hqu2pisuS6S4YK/Qt6vurcj/BmcbEsobIWWCQzhesNY8k73kIxx4X7Mg==", "integrity": "sha512-PO2gcfR3Oxa+u0QvECLe1xKXOqYTzCmWf0FhLhjREoW3fPAVamjihL7v1MOVLJLsnAMdLcjkfrs01yvDMwVK4Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/chai": "*" "@types/chai": "*"