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

removed isomorphic-fetch typing dependency #6894

Merged

Conversation

jeff-99
Copy link
Contributor

@jeff-99 jeff-99 commented Nov 6, 2017

@wing328, @TiFu, @taxpon, @sebastianhaas, @kenisteward, @Vrolijkx

after merging #6739 the devDependency to isomorphic-fetch types is no longer necessary.
plus I removed the "postinstall" npm command. The postinstall command required typescript + node types to be project dependencies insteadof devDependencies.

@kenisteward
Copy link
Contributor

@jeff-99 Thanks for the PR. run the samples creation to update the samples for this.

@wing328 will be working on switching the CI stuff tomorrow so those errors should go away.

I'll approve after the samples are regenerated

@jeff-99
Copy link
Contributor Author

jeff-99 commented Nov 6, 2017

@kenisteward, i regenerated the samples + security samples, but they did not change the generated files.

@kenisteward
Copy link
Contributor

kenisteward commented Nov 6, 2017 via email

@wing328
Copy link
Contributor

wing328 commented Nov 9, 2017

The samples has not been updated and I've done it via another branch waiting for the CI results.

@kenisteward
Copy link
Contributor

@wing328 thanks

@wing328
Copy link
Contributor

wing328 commented Nov 13, 2017

I updated the TS Fetch sample and got some errors:

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @swagger/typescript-fetch-petstore@1.0.0 No repository field.

added 8 packages in 1.459s

> @swagger/typescript-fetch-petstore@1.0.0 test /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/es6-target
> echo 'Error: no test specified'

Error: no test specified
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @swagger/typescript-fetch-petstore@1.0.0 No repository field.

added 8 packages in 1.198s

> @swagger/typescript-fetch-petstore@1.0.0 test /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version
> echo 'Error: no test specified'

Error: no test specified
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> typescript-fetch-test@1.0.0 prepublish /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default
> npm install ../../builds/with-npm-version && npm run build && npm run webpack && npm run browserify

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ @swagger/typescript-fetch-petstore@1.0.0
added 116 packages and updated 1 package in 7.236s

> typescript-fetch-test@1.0.0 build /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default
> tsc

../../builds/with-npm-version/api.ts(16,22): error TS2307: Cannot find module 'url'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! typescript-fetch-test@1.0.0 build: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the typescript-fetch-test@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2017-11-13T05_12_08_022Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! typescript-fetch-test@1.0.0 prepublish: `npm install ../../builds/with-npm-version && npm run build && npm run webpack && npm run browserify`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the typescript-fetch-test@1.0.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2017-11-13T05_12_08_105Z-debug.log

Ref: https://travis-ci.org/swagger-api/swagger-codegen/builds/301200047

Can you guys please take a look when you've time?

Branch: https://github.com/swagger-api/swagger-codegen/tree/jeff-99-feature/typescript-fetch-package-json-fixes

@wing328
Copy link
Contributor

wing328 commented Nov 27, 2017

@jeff-99 are you able to reproduce the error I mentioned above?

@jeff-99
Copy link
Contributor Author

jeff-99 commented Dec 5, 2017

@wing328, sorry for the late response, but i can't seem to reproduce the errors.
To generate the samples i've run:

 ./bin/typescript-fetch-petstore-all.sh 

and in the samples directories( samples/client/petstore/typescript-fetch/builds/*) i ran the "npm install" and "npm build" commands.

I did the same within: samples/client/petstore/typescript-fetch/tests/default.
No errors. I tested with npm v4.2.0 and node 7.10.1 (default on ubuntu 16.04).

Is this the correct way of testing ?

output of npm install in samples/client/petstore/typescript-fetch/tests/default

npm WARN deprecated typings@2.1.1: Typings is deprecated in favor of NPM @types -- see README for more information

> @swagger/typescript-fetch-petstore@1.0.0 postinstall /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default/node_modules/@swagger/typescript-fetch-petstore
> npm run build


> @swagger/typescript-fetch-petstore@1.0.0 build /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default/node_modules/@swagger/typescript-fetch-petstore
> tsc --outDir dist/

npm WARN prepublish-on-install As of npm@5, `prepublish` scripts will run only for `npm publish`.
npm WARN prepublish-on-install (In npm@4 and previous versions, it also runs for `npm install`.)
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> typescript-fetch-test@1.0.0 prepublish /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default
> npm install ../../builds/with-npm-version && npm run build && npm run webpack && npm run browserify


> @swagger/typescript-fetch-petstore@1.0.0 postinstall /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default/node_modules/@swagger/typescript-fetch-petstore
> npm run build


> @swagger/typescript-fetch-petstore@1.0.0 build /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default/node_modules/@swagger/typescript-fetch-petstore
> tsc --outDir dist/

typescript-fetch-test@1.0.0 /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default
└── @swagger/typescript-fetch-petstore@1.0.0 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

> typescript-fetch-test@1.0.0 build /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default
> tsc


> typescript-fetch-test@1.0.0 webpack /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default
> webpack

ts-loader: Using typescript@2.6.2 and /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default/tsconfig.json
Hash: fd012e06ab95b699c748
Version: webpack 1.15.0
Time: 2010ms
                          Asset    Size  Chunks             Chunk Names
  ./dist/test.webpack-bundle.js  358 kB       0  [emitted]  app
./dist/vendor.webpack-bundle.js  148 kB       1  [emitted]  vendor
   [0] multi vendor 28 bytes {1} [built]
    + 55 hidden modules

> typescript-fetch-test@1.0.0 browserify /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default
> browserify test -p [ tsify ] > ./dist/test.browserify-bundle.js

typescript-fetch-test@1.0.0 /home/jeff/dev/swagger-codegen-fork/samples/client/petstore/typescript-fetch/tests/default
├─┬ @swagger/typescript-fetch-petstore@1.0.0 
│ └─┬ portable-fetch@3.0.0 
│   ├─┬ node-fetch@1.7.3 
│   │ ├─┬ encoding@0.1.12 
│   │ │ └── iconv-lite@0.4.19 
│   │ └── is-stream@1.1.0 
│   └── whatwg-fetch@2.0.3 
├── @types/chai@4.0.8 
├── @types/isomorphic-fetch@0.0.34 
├── @types/mocha@2.2.44 
├── @types/node@8.0.55 
├─┬ browserify@14.5.0 
│ ├── assert@1.4.1 
│ ├─┬ browser-pack@6.0.2 
│ │ ├─┬ combine-source-map@0.7.2 
│ │ │ ├── inline-source-map@0.6.2 
│ │ │ └── lodash.memoize@3.0.4 
│ │ └── umd@3.0.1 
│ ├─┬ browser-resolve@1.11.2 
│ │ └── resolve@1.1.7 
│ ├─┬ browserify-zlib@0.2.0 
│ │ └── pako@1.0.6 
│ ├─┬ buffer@5.0.8 
│ │ ├── base64-js@1.2.1 
│ │ └── ieee754@1.1.8 
│ ├── cached-path-relative@1.0.1 
│ ├─┬ concat-stream@1.5.2 
│ │ ├─┬ readable-stream@2.0.6 
│ │ │ └── string_decoder@0.10.31 
│ │ └── typedarray@0.0.6 
│ ├─┬ console-browserify@1.1.0 
│ │ └── date-now@0.1.4 
│ ├── constants-browserify@1.0.0 
│ ├─┬ crypto-browserify@3.12.0 
│ │ ├─┬ browserify-cipher@1.0.0 
│ │ │ ├─┬ browserify-aes@1.1.1 
│ │ │ │ └── buffer-xor@1.0.3 
│ │ │ ├─┬ browserify-des@1.0.0 
│ │ │ │ └── des.js@1.0.0 
│ │ │ └─┬ evp_bytestokey@1.0.3 
│ │ │   └─┬ md5.js@1.3.4 
│ │ │     └── hash-base@3.0.4 
│ │ ├─┬ browserify-sign@4.0.4 
│ │ │ ├── bn.js@4.11.8 
│ │ │ ├── browserify-rsa@4.0.1 
│ │ │ ├─┬ elliptic@6.4.0 
│ │ │ │ ├── brorand@1.1.0 
│ │ │ │ ├── hash.js@1.1.3 
│ │ │ │ ├── hmac-drbg@1.0.1 
│ │ │ │ ├── minimalistic-assert@1.0.0 
│ │ │ │ └── minimalistic-crypto-utils@1.0.1 
│ │ │ └─┬ parse-asn1@5.1.0 
│ │ │   └── asn1.js@4.9.2 
│ │ ├── create-ecdh@4.0.0 
│ │ ├─┬ create-hash@1.1.3 
│ │ │ ├── cipher-base@1.0.4 
│ │ │ └─┬ ripemd160@2.0.1 
│ │ │   └── hash-base@2.0.2 
│ │ ├── create-hmac@1.1.6 
│ │ ├─┬ diffie-hellman@5.0.2 
│ │ │ └── miller-rabin@4.0.1 
│ │ ├── pbkdf2@3.0.14 
│ │ ├── public-encrypt@4.0.0 
│ │ ├── randombytes@2.0.5 
│ │ └── randomfill@1.0.3 
│ ├── defined@1.0.0 
│ ├── deps-sort@2.0.0 
│ ├── domain-browser@1.1.7 
│ ├── duplexer2@0.1.4 
│ ├── events@1.1.1 
│ ├─┬ glob@7.1.2 
│ │ ├─┬ inflight@1.0.6 
│ │ │ └── wrappy@1.0.2 
│ │ ├─┬ minimatch@3.0.4 
│ │ │ └─┬ brace-expansion@1.1.8 
│ │ │   ├── balanced-match@1.0.0 
│ │ │   └── concat-map@0.0.1 
│ │ ├── once@1.4.0 
│ │ └── path-is-absolute@1.0.1 
│ ├─┬ has@1.0.1 
│ │ └── function-bind@1.1.1 
│ ├── htmlescape@1.1.1 
│ ├── https-browserify@1.0.0 
│ ├── inherits@2.0.3 
│ ├─┬ insert-module-globals@7.0.1 
│ │ ├── is-buffer@1.1.6 
│ │ └─┬ lexical-scope@1.2.0 
│ │   └── astw@2.2.0 
│ ├─┬ JSONStream@1.3.1 
│ │ ├── jsonparse@1.3.1 
│ │ └── through@2.3.8 
│ ├─┬ labeled-stream-splicer@2.0.0 
│ │ ├── isarray@0.0.1 
│ │ └── stream-splicer@2.0.0 
│ ├─┬ module-deps@4.1.1 
│ │ ├─┬ detective@4.7.0 
│ │ │ └── acorn@5.2.1 
│ │ └── stream-combiner2@1.1.1 
│ ├── os-browserify@0.3.0 
│ ├─┬ parents@1.0.1 
│ │ └── path-platform@0.11.15 
│ ├── path-browserify@0.0.0 
│ ├── process@0.11.10 
│ ├── punycode@1.4.1 
│ ├── querystring-es3@0.2.1 
│ ├── read-only-stream@2.0.0 
│ ├─┬ readable-stream@2.3.3 
│ │ ├── core-util-is@1.0.2 
│ │ ├── isarray@1.0.0 
│ │ ├── process-nextick-args@1.0.7 
│ │ ├── safe-buffer@5.1.1 
│ │ └── util-deprecate@1.0.2 
│ ├─┬ resolve@1.5.0 
│ │ └── path-parse@1.0.5 
│ ├─┬ shasum@1.0.2 
│ │ ├── json-stable-stringify@0.0.1 
│ │ └── sha.js@2.4.9 
│ ├─┬ shell-quote@1.6.1 
│ │ ├── array-filter@0.0.1 
│ │ ├── array-map@0.0.0 
│ │ ├── array-reduce@0.0.0 
│ │ └── jsonify@0.0.0 
│ ├── stream-browserify@2.0.1 
│ ├─┬ stream-http@2.7.2 
│ │ ├── builtin-status-codes@3.0.0 
│ │ └── to-arraybuffer@1.0.1 
│ ├── string_decoder@1.0.3 
│ ├── subarg@1.0.0 
│ ├─┬ syntax-error@1.3.0 
│ │ └── acorn@4.0.13 
│ ├── through2@2.0.3 
│ ├── timers-browserify@1.4.2 
│ ├── tty-browserify@0.0.0 
│ ├─┬ url@0.11.0 
│ │ ├── punycode@1.3.2 
│ │ └── querystring@0.2.0 
│ ├─┬ util@0.10.3 
│ │ └── inherits@2.0.1 
│ ├─┬ vm-browserify@0.0.4 
│ │ └── indexof@0.0.1 
│ └── xtend@4.0.1 
├─┬ chai@4.1.2 
│ ├── assertion-error@1.0.2 
│ ├── check-error@1.0.2 
│ ├── deep-eql@3.0.1 
│ ├── get-func-name@2.0.0 
│ ├── pathval@1.1.0 
│ └── type-detect@4.0.5 
├─┬ mocha@3.5.3 
│ ├── browser-stdout@1.3.0 
│ ├─┬ commander@2.9.0 
│ │ └── graceful-readlink@1.0.1 
│ ├─┬ debug@2.6.8 
│ │ └── ms@2.0.0 
│ ├── diff@3.2.0 
│ ├── escape-string-regexp@1.0.5 
│ ├── glob@7.1.1 
│ ├── growl@1.9.2 
│ ├── he@1.1.1 
│ ├── json3@3.3.2 
│ ├─┬ lodash.create@3.1.1 
│ │ ├─┬ lodash._baseassign@3.2.0 
│ │ │ ├── lodash._basecopy@3.0.1 
│ │ │ └─┬ lodash.keys@3.1.2 
│ │ │   ├── lodash._getnative@3.9.1 
│ │ │   ├── lodash.isarguments@3.1.0 
│ │ │   └── lodash.isarray@3.0.4 
│ │ ├── lodash._basecreate@3.0.3 
│ │ └── lodash._isiterateecall@3.0.9 
│ ├─┬ mkdirp@0.5.1 
│ │ └── minimist@0.0.8 
│ └─┬ supports-color@3.1.2 
│   └── has-flag@1.0.0 
├─┬ ts-loader@2.3.7 
│ ├─┬ chalk@2.3.0 
│ │ ├─┬ ansi-styles@3.2.0 
│ │ │ └─┬ color-convert@1.9.1 
│ │ │   └── color-name@1.1.3 
│ │ └─┬ supports-color@4.5.0 
│ │   └── has-flag@2.0.0 
│ ├─┬ enhanced-resolve@3.4.1 
│ │ ├── graceful-fs@4.1.11 
│ │ ├── memory-fs@0.4.1 
│ │ └── tapable@0.2.8 
│ ├─┬ loader-utils@1.1.0 
│ │ ├── big.js@3.2.0 
│ │ ├── emojis-list@2.1.0 
│ │ └── json5@0.5.1 
│ └── semver@5.4.1 
├─┬ ts-node@3.3.0 
│ ├── arrify@1.0.1 
│ ├── diff@3.4.0 
│ ├── make-error@1.3.0 
│ ├── minimist@1.2.0 
│ ├─┬ source-map-support@0.4.18 
│ │ └── source-map@0.5.7 
│ ├─┬ tsconfig@6.0.0 
│ │ ├── strip-bom@3.0.0 
│ │ └── strip-json-comments@2.0.1 
│ ├─┬ v8flags@3.0.1 
│ │ └─┬ homedir-polyfill@1.0.1 
│ │   └── parse-passwd@1.0.0 
│ └── yn@2.0.0 
├─┬ tsify@3.0.4 
│ ├── convert-source-map@1.1.3 
│ ├── fs.realpath@1.0.0 
│ ├── object-assign@4.1.1 
│ └─┬ tsconfig@5.0.3 
│   ├── any-promise@1.3.0 
│   ├─┬ parse-json@2.2.0 
│   │ └─┬ error-ex@1.3.1 
│   │   └── is-arrayish@0.2.1 
│   └─┬ strip-bom@2.0.0 
│     └── is-utf8@0.2.1 
├── typescript@2.6.2 
├─┬ typings@2.1.1 
│ ├── archy@1.0.0 
│ ├── bluebird@3.5.1 
│ ├─┬ chalk@1.1.3 
│ │ ├── ansi-styles@2.2.1 
│ │ ├── has-ansi@2.0.0 
│ │ └── supports-color@2.0.0 
│ ├─┬ cli-truncate@1.1.0 
│ │ ├─┬ slice-ansi@1.0.0 
│ │ │ └── is-fullwidth-code-point@2.0.0 
│ │ └─┬ string-width@2.1.1 
│ │   └─┬ strip-ansi@4.0.0 
│ │     └── ansi-regex@3.0.0 
│ ├─┬ columnify@1.5.4 
│ │ ├─┬ strip-ansi@3.0.1 
│ │ │ └── ansi-regex@2.1.1 
│ │ └─┬ wcwidth@1.0.1 
│ │   └── defaults@1.0.3 
│ ├── elegant-spinner@1.0.1 
│ ├── has-unicode@2.0.1 
│ ├── listify@1.0.0 
│ ├─┬ log-update@1.0.2 
│ │ ├── ansi-escapes@1.4.0 
│ │ └─┬ cli-cursor@1.0.2 
│ │   └─┬ restore-cursor@1.0.1 
│ │     ├── exit-hook@1.1.1 
│ │     └── onetime@1.1.0 
│ ├── promise-finally@3.0.0 
│ ├─┬ typings-core@2.3.3 
│ │ ├── array-uniq@1.0.3 
│ │ ├─┬ configstore@3.1.1 
│ │ │ ├─┬ dot-prop@4.2.0 
│ │ │ │ └── is-obj@1.0.1 
│ │ │ ├─┬ make-dir@1.1.0 
│ │ │ │ └── pify@3.0.0 
│ │ │ ├─┬ unique-string@1.0.0 
│ │ │ │ └── crypto-random-string@1.0.0 
│ │ │ └─┬ write-file-atomic@2.3.0 
│ │ │   ├── imurmurhash@0.1.4 
│ │ │   └── signal-exit@3.0.2 
│ │ ├── detect-indent@5.0.0 
│ │ ├─┬ invariant@2.2.2 
│ │ │ └─┬ loose-envify@1.3.1 
│ │ │   └── js-tokens@3.0.2 
│ │ ├─┬ is-absolute@0.2.6 
│ │ │ ├─┬ is-relative@0.2.1 
│ │ │ │ └─┬ is-unc-path@0.1.2 
│ │ │ │   └── unc-path-regex@0.1.2 
│ │ │ └── is-windows@0.2.0 
│ │ ├── jspm-config@0.3.4 
│ │ ├── lockfile@1.0.3 
│ │ ├── make-error-cause@1.2.2 
│ │ ├─┬ object.pick@1.3.0 
│ │ │ └── isobject@3.0.1 
│ │ ├─┬ popsicle@9.2.0 
│ │ │ ├─┬ form-data@2.3.1 
│ │ │ │ ├── asynckit@0.4.0 
│ │ │ │ ├─┬ combined-stream@1.0.5 
│ │ │ │ │ └── delayed-stream@1.0.0 
│ │ │ │ └─┬ mime-types@2.1.17 
│ │ │ │   └── mime-db@1.30.0 
│ │ │ └── tough-cookie@2.3.3 
│ │ ├─┬ popsicle-proxy-agent@3.0.0 
│ │ │ ├─┬ http-proxy-agent@1.0.0 
│ │ │ │ ├─┬ agent-base@2.1.1 
│ │ │ │ │ └── semver@5.0.3 
│ │ │ │ └── extend@3.0.1 
│ │ │ └── https-proxy-agent@1.0.0 
│ │ ├── popsicle-retry@3.2.1 
│ │ ├── popsicle-rewrite@1.0.0 
│ │ ├── popsicle-status@2.0.1 
│ │ ├─┬ rc@1.2.2 
│ │ │ ├── deep-extend@0.4.2 
│ │ │ └── ini@1.3.5 
│ │ ├── rimraf@2.6.2 
│ │ ├─┬ sort-keys@1.1.2 
│ │ │ └── is-plain-obj@1.1.0 
│ │ ├── string-template@1.0.0 
│ │ ├── thenify@3.3.0 
│ │ ├── throat@3.2.0 
│ │ ├─┬ touch@1.0.0 
│ │ │ └─┬ nopt@1.0.10 
│ │ │   └── abbrev@1.1.1 
│ │ └── zip-object@0.1.0 
│ ├─┬ update-notifier@2.3.0 
│ │ ├─┬ boxen@1.3.0 
│ │ │ ├── ansi-align@2.0.0 
│ │ │ ├── camelcase@4.1.0 
│ │ │ ├── cli-boxes@1.0.0 
│ │ │ ├─┬ term-size@1.2.0 
│ │ │ │ └─┬ execa@0.7.0 
│ │ │ │   ├─┬ cross-spawn@5.1.0 
│ │ │ │   │ ├─┬ lru-cache@4.1.1 
│ │ │ │   │ │ ├── pseudomap@1.0.2 
│ │ │ │   │ │ └── yallist@2.1.2 
│ │ │ │   │ ├─┬ shebang-command@1.2.0 
│ │ │ │   │ │ └── shebang-regex@1.0.0 
│ │ │ │   │ └─┬ which@1.3.0 
│ │ │ │   │   └── isexe@2.0.0 
│ │ │ │   ├── get-stream@3.0.0 
│ │ │ │   ├─┬ npm-run-path@2.0.2 
│ │ │ │   │ └── path-key@2.0.1 
│ │ │ │   ├── p-finally@1.0.0 
│ │ │ │   └── strip-eof@1.0.0 
│ │ │ └── widest-line@2.0.0 
│ │ ├── import-lazy@2.1.0 
│ │ ├─┬ is-installed-globally@0.1.0 
│ │ │ ├── global-dirs@0.1.1 
│ │ │ └─┬ is-path-inside@1.0.1 
│ │ │   └── path-is-inside@1.0.2 
│ │ ├── is-npm@1.0.0 
│ │ ├─┬ latest-version@3.1.0 
│ │ │ └─┬ package-json@4.0.1 
│ │ │   ├─┬ got@6.7.1 
│ │ │   │ ├─┬ create-error-class@3.0.2 
│ │ │   │ │ └── capture-stack-trace@1.0.0 
│ │ │   │ ├── duplexer3@0.1.4 
│ │ │   │ ├── is-redirect@1.0.0 
│ │ │   │ ├── is-retry-allowed@1.1.0 
│ │ │   │ ├── lowercase-keys@1.0.0 
│ │ │   │ ├── timed-out@4.0.1 
│ │ │   │ ├── unzip-response@2.0.1 
│ │ │   │ └─┬ url-parse-lax@1.0.0 
│ │ │   │   └── prepend-http@1.0.4 
│ │ │   ├── registry-auth-token@3.3.1 
│ │ │   └── registry-url@3.1.0 
│ │ ├── semver-diff@2.1.0 
│ │ └── xdg-basedir@3.0.0 
│ └── wordwrap@1.0.0 
└─┬ webpack@1.15.0 
  ├── acorn@3.3.0 
  ├── async@1.5.2 
  ├── clone@1.0.3 
  ├─┬ enhanced-resolve@0.9.1 
  │ └── memory-fs@0.2.0 
  ├── interpret@0.6.6 
  ├── loader-utils@0.2.17 
  ├─┬ memory-fs@0.3.0 
  │ └─┬ errno@0.1.4 
  │   └── prr@0.0.0 
  ├─┬ node-libs-browser@0.7.0 
  │ ├─┬ browserify-zlib@0.1.4 
  │ │ └── pako@0.2.9 
  │ ├── buffer@4.9.1 
  │ ├─┬ crypto-browserify@3.3.0 
  │ │ ├── browserify-aes@0.4.0 
  │ │ ├── pbkdf2-compat@2.0.1 
  │ │ ├── ripemd160@0.2.0 
  │ │ └── sha.js@2.2.6 
  │ ├── https-browserify@0.0.1 
  │ ├── os-browserify@0.2.1 
  │ ├── string_decoder@0.10.31 
  │ └─┬ timers-browserify@2.0.4 
  │   └── setimmediate@1.0.5 
  ├─┬ optimist@0.6.1 
  │ ├── minimist@0.0.10 
  │ └── wordwrap@0.0.3 
  ├─┬ supports-color@3.2.3 
  │ └── has-flag@1.0.0 
  ├── tapable@0.1.10 
  ├─┬ uglify-js@2.7.5 
  │ ├── async@0.2.10 
  │ ├── uglify-to-browserify@1.0.2 
  │ └─┬ yargs@3.10.0 
  │   ├── camelcase@1.2.1 
  │   ├─┬ cliui@2.1.0 
  │   │ ├─┬ center-align@0.1.3 
  │   │ │ ├─┬ align-text@0.1.4 
  │   │ │ │ ├── longest@1.0.1 
  │   │ │ │ └── repeat-string@1.6.1 
  │   │ │ └── lazy-cache@1.0.4 
  │   │ ├── right-align@0.1.3 
  │   │ └── wordwrap@0.0.2 
  │   ├── decamelize@1.2.0 
  │   └── window-size@0.1.0 
  ├─┬ watchpack@0.2.9 
  │ ├── async@0.9.2 
  │ └─┬ chokidar@1.7.0 
  │   ├─┬ anymatch@1.3.2 
  │   │ ├─┬ micromatch@2.3.11 
  │   │ │ ├─┬ arr-diff@2.0.0 
  │   │ │ │ └── arr-flatten@1.1.0 
  │   │ │ ├── array-unique@0.2.1 
  │   │ │ ├─┬ braces@1.8.5 
  │   │ │ │ ├─┬ expand-range@1.8.2 
  │   │ │ │ │ └─┬ fill-range@2.2.3 
  │   │ │ │ │   ├── is-number@2.1.0 
  │   │ │ │ │   ├── isobject@2.1.0 
  │   │ │ │ │   └─┬ randomatic@1.1.7 
  │   │ │ │ │     ├─┬ is-number@3.0.0 
  │   │ │ │ │     │ └── kind-of@3.2.2 
  │   │ │ │ │     └── kind-of@4.0.0 
  │   │ │ │ ├── preserve@0.2.0 
  │   │ │ │ └── repeat-element@1.1.2 
  │   │ │ ├─┬ expand-brackets@0.1.5 
  │   │ │ │ └── is-posix-bracket@0.1.1 
  │   │ │ ├── extglob@0.3.2 
  │   │ │ ├── filename-regex@2.0.1 
  │   │ │ ├── kind-of@3.2.2 
  │   │ │ ├─┬ object.omit@2.0.1 
  │   │ │ │ ├─┬ for-own@0.1.5 
  │   │ │ │ │ └── for-in@1.0.2 
  │   │ │ │ └── is-extendable@0.1.1 
  │   │ │ ├─┬ parse-glob@3.0.4 
  │   │ │ │ ├── glob-base@0.3.0 
  │   │ │ │ └── is-dotfile@1.0.3 
  │   │ │ └─┬ regex-cache@0.4.4 
  │   │ │   └─┬ is-equal-shallow@0.1.3 
  │   │ │     └── is-primitive@2.0.0 
  │   │ └─┬ normalize-path@2.1.1 
  │   │   └── remove-trailing-separator@1.1.0 
  │   ├── async-each@1.0.1 
  │   ├── glob-parent@2.0.0 
  │   ├─┬ is-binary-path@1.0.1 
  │   │ └── binary-extensions@1.11.0 
  │   ├─┬ is-glob@2.0.1 
  │   │ └── is-extglob@1.0.0 
  │   └─┬ readdirp@2.1.0 
  │     └── set-immediate-shim@1.0.1 
  └─┬ webpack-core@0.6.9 
    ├── source-list-map@0.1.8 
    └─┬ source-map@0.4.4 
      └── amdefine@1.0.1 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})


@wing328
Copy link
Contributor

wing328 commented Dec 11, 2017

@jeff-99 After you ran ./bin/typescript-fetch-petstore-all.sh, did you run git diff to see if there's any change to the Petstore samples?

I tried again and found some updates to the Petstore samples: 29e00c5

and the CI job again failed with the same error: https://travis-ci.org/swagger-api/swagger-codegen/builds/314844531

@wing328 wing328 modified the milestones: v2.3.0, v2.4.0 Dec 18, 2017
@wing328 wing328 modified the milestones: v2.4.0, Future Jan 7, 2018
@jeff-99 jeff-99 force-pushed the feature/typescript-fetch-package-json-fixes branch from 12d68e7 to 88c17d7 Compare January 16, 2018 18:33
@wing328
Copy link
Contributor

wing328 commented Jan 24, 2018

I did another test with the latest PR and got the following errors:

ts-loader: Using typescript@2.4.2 and /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/tsconfig.json
Hash: fb940b3984dfa041d29a
Version: webpack 1.15.0
Time: 2048ms
                          Asset     Size  Chunks             Chunk Names
  ./dist/test.webpack-bundle.js   374 kB       0  [emitted]  app
./dist/vendor.webpack-bundle.js  5.01 kB       1  [emitted]  vendor
   [0] multi vendor 28 bytes {1} [built]
    + 45 hidden modules

ERROR in /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version/index.ts
Module not found: Error: Cannot resolve module 'ts-loader' in /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version
 @ /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version/index.ts 18:9-25

ERROR in /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version/index.ts
Module not found: Error: Cannot resolve module 'ts-loader' in /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version
 @ /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version/index.ts 19:9-35

> typescript-fetch-test@1.0.0 browserify /home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default
> browserify test -p [ tsify ] > ./dist/test.browserify-bundle.js


/home/travis/build/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/with-npm-version/index.ts:15
export * from "./api";
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! typescript-fetch-test@1.0.0 browserify: `browserify test -p [ tsify ] > ./dist/test.browserify-bundle.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the typescript-fetch-test@1.0.0 browserify script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-01-24T04_37_36_137Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! typescript-fetch-test@1.0.0 prepublish: `npm install ../../builds/with-npm-version && npm run build && npm run webpack && npm run browserify`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the typescript-fetch-test@1.0.0 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-01-24T04_37_36_199Z-debug.log
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (npm-install) on project TypeScriptFetchPestoreClientTests: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :TypeScriptFetchPestoreClientTests

I would suggest you create a new PR based on the latest master.

@jeff-99 jeff-99 force-pushed the feature/typescript-fetch-package-json-fixes branch from 1411c40 to 6c6850a Compare January 24, 2018 19:10
@jeff-99
Copy link
Contributor Author

jeff-99 commented Jan 25, 2018

Hi @wing328,
I fixed the errors for the mvn verify command.
Importing the generated module from a package registry now no longer requires typescript as a dependency.

@wing328
Copy link
Contributor

wing328 commented Jan 25, 2018

@jeff-99 ok. I'll test it again and let you know if I need any help.

@wing328
Copy link
Contributor

wing328 commented Jan 25, 2018

Test results look good. Thanks again for the PR.

@wing328 wing328 modified the milestones: Future, v2.4.0 Jan 25, 2018
@wing328 wing328 merged commit 2b84118 into swagger-api:master Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants