Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Commit

Permalink
Updating with M94 bits.
Browse files Browse the repository at this point in the history
  • Loading branch information
serkan-inci committed Feb 2, 2016
1 parent ff3ae7d commit cc792d4
Show file tree
Hide file tree
Showing 5 changed files with 5,076 additions and 1,025 deletions.
21 changes: 18 additions & 3 deletions lib/VSS.SDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ var XDM;
if (!this._isRejected && !this._isResolved) {
this._isRejected = true;
this._rejectValue = reason;
if (this._rejectCallbacks.length === 0 && window.console && window.console.warn) {
console.warn("Rejected XDM promise with no reject callbacks");
if (reason) {
console.warn(reason);
}
}
}
if (this._isRejected && this._rejectCallbacks.length > 0) {
var rejectCallbacks = this._rejectCallbacks.splice(0);
Expand Down Expand Up @@ -733,7 +739,7 @@ var VSS;
}
else {
if (!initOptions) {
init({ setupModuleLoader: true });
init({ usePlatformScripts: true });
}
else if (!usingPlatformScripts) {
usingPlatformScripts = true;
Expand Down Expand Up @@ -955,6 +961,7 @@ var VSS;
return;
}
var scripts = [];
var anyCoreScriptLoaded = false;
// Add scripts and loader configuration
if (hostPageContext.coreReferences.scripts) {
hostPageContext.coreReferences.scripts.forEach(function (script) {
Expand All @@ -967,14 +974,22 @@ var VSS;
else if (script.identifier === "JQueryUI") {
alreadyLoaded = !!(global.jQuery && global.jQuery.ui && global.jQuery.ui.version);
}
else if (script.identifier === "MicrosoftAjax") {
alreadyLoaded = !!(global.Sys && global.Sys.Browser);
else if (script.identifier === "AMDLoader") {
alreadyLoaded = typeof global.define === "function" && !!global.define.amd;
}
if (!alreadyLoaded) {
scripts.push({ source: getAbsoluteUrl(script.url, hostRootUri) });
}
else {
anyCoreScriptLoaded = true;
}
}
});
if (hostPageContext.coreReferences.coreScriptsBundle && !anyCoreScriptLoaded) {
// If core scripts bundle exists and no core scripts already loaded by extension,
// we are free to add core bundle. otherwise, load core scripts individually.
scripts = [{ source: getAbsoluteUrl(hostPageContext.coreReferences.coreScriptsBundle.url, hostRootUri) }];
}
}
// Define a new config for extension loader
var newConfig = {
Expand Down
3 changes: 2 additions & 1 deletion lib/VSS.SDK.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "vss-sdk",
"version": "0.92.0",
"version": "1.94.0",
"description": "Visual Studio Services Client SDK. JavaScript library for Visual Studio Online extensions.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/vss-sdk.git"
"url": "https://github.com/Microsoft/vss-web-extension-sdk.git"
},
"keywords": [
"extensions",
Expand All @@ -22,7 +22,7 @@
"author": "serkan-inci",
"license": "ISC",
"bugs": {
"url": "https://github.com/Microsoft/vss-sdk/issues"
"url": "https://github.com/Microsoft/vss-web-extension-sdk/issues"
},
"homepage": "https://www.visualstudio.com/integrate/extensions/overview"
}
Loading

0 comments on commit cc792d4

Please sign in to comment.