Skip to content

Commit 32349fa

Browse files
Rename domain-tasks to domain-task
1 parent 4312d6e commit 32349fa

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

samples/react/MusicStore/ReactApp/fx/domain-tasks.d.ts renamed to samples/react/MusicStore/ReactApp/fx/domain-task.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// TODO: Move this on to definitelytyped, and take a dependency on whatwg-fetch
22
// so that the 'fetch' function can have the correct type args
33

4-
declare module 'domain-tasks' {
4+
declare module 'domain-task' {
55
function addTask(task: PromiseLike<any>): void;
66
}
77

8-
declare module 'domain-tasks/fetch' {
8+
declare module 'domain-task/fetch' {
99
function fetch(url, options?): Promise<any>;
1010
}

samples/react/MusicStore/ReactApp/fx/render-server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require('./require-ts-babel')(); // Enable loading TS/TSX/JSX/ES2015 modules
22
var url = require('url');
3-
var domainTasks = require('domain-tasks');
4-
var baseUrl = require('domain-tasks/fetch').baseUrl;
3+
var domainTask = require('domain-task');
4+
var baseUrl = require('domain-task/fetch').baseUrl;
55

66
function render(bootModulePath, absoluteRequestUrl, requestPathAndQuery, callback) {
77
var bootFunc = require(bootModulePath);
@@ -19,11 +19,11 @@ function render(bootModulePath, absoluteRequestUrl, requestPathAndQuery, callbac
1919
};
2020

2121
// Open a new domain that can track all the async tasks commenced during first render
22-
domainTasks.run(function() {
22+
domainTask.run(function() {
2323
baseUrl(absoluteRequestUrl);
2424

2525
// Since route matching is asynchronous, add the rendering itself to the list of tasks we're awaiting
26-
domainTasks.addTask(new Promise(function (resolve, reject) {
26+
domainTask.addTask(new Promise(function (resolve, reject) {
2727
// Now actually perform the first render that will match a route and commence associated tasks
2828
bootFunc(params, function(error, result) {
2929
if (error) {

samples/react/MusicStore/ReactApp/store/AlbumDetails.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fetch } from 'domain-tasks/fetch';
1+
import { fetch } from 'domain-task/fetch';
22
import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux';
33
import { ActionCreator } from './';
44
import { Genre } from './GenreList';

samples/react/MusicStore/ReactApp/store/FeaturedAlbums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fetch } from 'domain-tasks/fetch';
1+
import { fetch } from 'domain-task/fetch';
22
import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux';
33
import { ActionCreator } from './';
44

samples/react/MusicStore/ReactApp/store/GenreDetails.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fetch } from 'domain-tasks/fetch';
1+
import { fetch } from 'domain-task/fetch';
22
import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux';
33
import { ActionCreator } from './';
44
import { Album } from './FeaturedAlbums';

samples/react/MusicStore/ReactApp/store/GenreList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fetch } from 'domain-tasks/fetch';
1+
import { fetch } from 'domain-task/fetch';
22
import { typeName, isActionType, Action, Reducer } from '../fx/TypedRedux';
33
import { ActionCreator } from './';
44

samples/react/MusicStore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"dependencies": {
2222
"bootstrap": "^3.3.6",
2323
"domain-context": "^0.5.1",
24-
"domain-tasks": "^1.0.0",
24+
"domain-task": "^1.0.0",
2525
"isomorphic-fetch": "^2.2.1",
2626
"ntypescript": "^1.201602072208.1",
2727
"react": "^0.14.7",

0 commit comments

Comments
 (0)