Skip to content

Update tests and documentation due to the latest bump in TS version #148

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

Merged
merged 3 commits into from
Jan 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ install:
- npm install $TYPESCRIPT
env:
- [email protected]
- TYPESCRIPT=typescript
- [email protected]
- [email protected]
- TYPESCRIPT=typescript@next
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build system using the [Node.js API](http://webpack.github.io/docs/node.js-api.h

### Compatibility

The current version is compatible with TypeScript 1.6, 1.7 and the [nightly build](http://blogs.msdn.com/b/typescript/archive/2015/07/27/introducing-typescript-nightlies.aspx).
The current version is compatible with TypeScript 1.6 and above, including the [nightly build](http://blogs.msdn.com/b/typescript/archive/2015/07/27/introducing-typescript-nightlies.aspx).
You may experience issues using the nightly build due to its nature, but a full test suite runs
against the latest nightly every day to catch incompatibilites early. Please report any issues
you experience with the nightly so that they can be fixed promptly.
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ environment:
nodejs_version: "0.12"
matrix:
- TYPESCRIPT: [email protected]
- TYPESCRIPT: typescript
- TYPESCRIPT: [email protected]
- TYPESCRIPT: [email protected]
- TYPESCRIPT: typescript@next
install:
- ps: Install-Product node $env:nodejs_version
Expand Down
61 changes: 61 additions & 0 deletions test/aliasResolution/expectedOutput-1.9/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var myComponent = __webpack_require__(1);
console.log(myComponent);


/***/ },
/* 1 */
/***/ function(module, exports) {

"use strict";
module.exports = 'myComponent';


/***/ }
/******/ ]);
5 changes: 5 additions & 0 deletions test/aliasResolution/expectedOutput-1.9/output.transpiled.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Asset Size Chunks Chunk Names
bundle.js 1.59 kB 0 [emitted] main
chunk {0} bundle.js (main) 139 bytes [rendered]
[0] ./.test/aliasResolution/app.ts 93 bytes {0} [built]
[1] ./.test/aliasResolution/common/components/myComponent.ts 46 bytes {0} [built]
8 changes: 8 additions & 0 deletions test/aliasResolution/expectedOutput-1.9/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Asset Size Chunks Chunk Names
bundle.js 1.59 kB 0 [emitted] main
chunk {0} bundle.js (main) 139 bytes [rendered]
[0] ./.test/aliasResolution/app.ts 93 bytes {0} [built] [1 error]
[1] ./.test/aliasResolution/common/components/myComponent.ts 46 bytes {0} [built]

ERROR in ./.test/aliasResolution/app.ts
(2,31): error TS2307: Cannot find module 'components/myComponent2'.
61 changes: 61 additions & 0 deletions test/aliasResolution/expectedOutput-1.9/patch0/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var myComponent = __webpack_require__(1);
console.log(myComponent);


/***/ },
/* 1 */
/***/ function(module, exports) {

"use strict";
module.exports = 'changed it';


/***/ }
/******/ ]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Asset Size Chunks Chunk Names
bundle.js 1.59 kB 0 [emitted] main
chunk {0} bundle.js (main) 138 bytes [rendered]
[0] ./.test/aliasResolution/app.ts 93 bytes {0}
[1] ./.test/aliasResolution/common/components/myComponent.ts 45 bytes {0} [built]
8 changes: 8 additions & 0 deletions test/aliasResolution/expectedOutput-1.9/patch0/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Asset Size Chunks Chunk Names
bundle.js 1.59 kB 0 [emitted] main
chunk {0} bundle.js (main) 138 bytes [rendered]
[0] ./.test/aliasResolution/app.ts 93 bytes {0} [1 error]
[1] ./.test/aliasResolution/common/components/myComponent.ts 45 bytes {0} [built]

ERROR in ./.test/aliasResolution/app.ts
(2,31): error TS2307: Cannot find module 'components/myComponent2'.
73 changes: 73 additions & 0 deletions test/basic/expectedOutput-1.9/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var submodule = __webpack_require__(1);
var externalLib = __webpack_require__(2);
externalLib.doSomething(submodule);


/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var externalLib = __webpack_require__(2);
externalLib.doSomething("");
var message = "Hello from submodule";
module.exports = message;


/***/ },
/* 2 */
/***/ function(module, exports) {

module.exports = {
doSomething: function() { }
}

/***/ }
/******/ ]);
6 changes: 6 additions & 0 deletions test/basic/expectedOutput-1.9/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Asset Size Chunks Chunk Names
bundle.js 1.89 kB 0 [emitted] main
chunk {0} bundle.js (main) 346 bytes [rendered]
[0] ./.test/basic/app.ts 142 bytes {0} [built]
[1] ./.test/basic/submodule/submodule.ts 149 bytes {0} [built]
[2] ./.test/basic/lib/externalLib.js 55 bytes {0} [built]
73 changes: 73 additions & 0 deletions test/basic/expectedOutput-1.9/patch0/bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

/******/ // The require function
/******/ function __webpack_require__(moduleId) {

/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };

/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ // Flag the module as loaded
/******/ module.loaded = true;

/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }


/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;

/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;

/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";

/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var submodule = __webpack_require__(1);
var externalLib = __webpack_require__(2);
externalLib.doSomething2(submodule);


/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

"use strict";
var externalLib = __webpack_require__(2);
externalLib.doSomething("");
var message = "Hello from submodule";
module.exports = message;


/***/ },
/* 2 */
/***/ function(module, exports) {

module.exports = {
doSomething: function() { }
}

/***/ }
/******/ ]);
6 changes: 6 additions & 0 deletions test/basic/expectedOutput-1.9/patch0/output.transpiled.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Asset Size Chunks Chunk Names
bundle.js 1.89 kB 0 [emitted] main
chunk {0} bundle.js (main) 347 bytes [rendered]
[0] ./.test/basic/app.ts 143 bytes {0} [built]
[1] ./.test/basic/submodule/submodule.ts 149 bytes {0}
[2] ./.test/basic/lib/externalLib.js 55 bytes {0}
9 changes: 9 additions & 0 deletions test/basic/expectedOutput-1.9/patch0/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Asset Size Chunks Chunk Names
bundle.js 1.89 kB 0 [emitted] main
chunk {0} bundle.js (main) 347 bytes [rendered]
[0] ./.test/basic/app.ts 143 bytes {0} [built] [1 error]
[1] ./.test/basic/submodule/submodule.ts 149 bytes {0}
[2] ./.test/basic/lib/externalLib.js 55 bytes {0}

ERROR in ./.test/basic/app.ts
(3,13): error TS2339: Property 'doSomething2' does not exist on type 'typeof externalLib'.
Loading