Skip to content

Conversation

@leonyu
Copy link
Contributor

@leonyu leonyu commented Nov 7, 2016

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

  • Update TypeScript Fetch TypeScript version to 2.0.7
  • Fix support for underscore casing in POST body

Fix support for underscore casing in POST body
@leonyu leonyu changed the title Update TypeScript version to 2.07 Update TypeScript Fetch TypeScript version to 2.0.7 Nov 7, 2016
@leonyu
Copy link
Contributor Author

leonyu commented Nov 7, 2016

The code was written against 2.2.0, and rebased.

I didn't run ./bin/{LANG}-petstore.sh, cause I couldn't get Maven to pass on master on my machine (OSX).

@wing328
Copy link
Contributor

wing328 commented Nov 11, 2016

@leonyu I updated the TS Fetch Petstore sample in https://github.com/swagger-api/swagger-codegen/tree/leonyu-update_to_typescript_2 and got the following error when running the test locally:

default|leonyu-update_to_typescript_2⚡ ⇒ npm install

> fsevents@1.0.15 install /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" is installed via remote

> typescript-fetch-test@1.0.0 prepublish /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default
> ./scripts/prepublish.sh


> typescript-fetch-api@0.0.0 prepublish /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/builds/default
> tsc

typescript-fetch-test@1.0.0 /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default
└─┬ typescript-fetch-api@0.0.0 
  ├── @types/core-js@0.9.34 
  ├── @types/isomorphic-fetch@0.0.31 
  ├── @types/node@6.0.46 
  ├── core-js@2.4.1 
  └─┬ isomorphic-fetch@2.2.1 
    ├─┬ node-fetch@1.6.3 
    │ └─┬ encoding@0.1.12 
    │   └── iconv-lite@0.4.13 
    └── whatwg-fetch@1.0.0 

typings WARN deprecated 6/2/2016: "registry:dt/chai#3.4.0+20160317120654" is deprecated (updated, replaced or removed)
typings WARN deprecated 6/14/2016: "registry:dt/es6-promise#0.0.0+20160423074304" is deprecated (updated, replaced or removed)
typings WARN deprecated 10/28/2016: "registry:dt/mocha#2.2.5+20160317120654" is deprecated (updated, replaced or removed)

├── chai (global)
├── es6-promise (global)
└── mocha (global)

node_modules/typescript-fetch-api/dist/api.d.ts(1,1): error TS1084: Invalid 'reference' directive syntax.
ts-loader: Using typescript@1.8.10 and /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/tsconfig.json
Hash: 18e866baa0cf3e197705
Version: webpack 1.13.3
Time: 2487ms
                          Asset    Size  Chunks             Chunk Names
  ./dist/test.webpack-bundle.js  225 kB       0  [emitted]  app
./dist/vendor.webpack-bundle.js  124 kB       1  [emitted]  vendor
   [0] multi vendor 28 bytes {1} [built]
    + 91 hidden modules

ERROR in /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/node_modules/typescript-fetch-api/dist/api.d.ts
(1,1): error TS1084: Invalid 'reference' directive syntax.
TypeScript error: /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/node_modules/typescript-fetch-api/dist/api.d.ts(1,1): Error TS1084: Invalid 'reference' directive syntax.

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/Users/williamcheng/.node/bin/npm" "install"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! typescript-fetch-test@1.0.0 prepublish: `./scripts/prepublish.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the typescript-fetch-test@1.0.0 prepublish script './scripts/prepublish.sh'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the typescript-fetch-test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./scripts/prepublish.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs typescript-fetch-test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls typescript-fetch-test
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default/npm-debug.log
default|leonyu-update_to_typescript_2⚡ ⇒ pwd
/Users/williamcheng/Code/swagger-api/swagger-codegen/samples/client/petstore/typescript-fetch/tests/default

@leonyu
Copy link
Contributor Author

leonyu commented Nov 15, 2016

Sorry, I am swamped with other work. Will take a look later this week.

@wing328
Copy link
Contributor

wing328 commented Nov 18, 2016

Please take your time. Let us know if you need any help.

@wing328
Copy link
Contributor

wing328 commented Jul 27, 2017

Closed via #6130

@wing328 wing328 closed this Jul 27, 2017
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.

2 participants