Skip to content

Commit

Permalink
Use relative paths for imports
Browse files Browse the repository at this point in the history
webpack has trouble when a package tries to import itself through its
own package name. Using relative paths is the most cross-bundler
solution.
  • Loading branch information
matthewp committed Jun 15, 2018
1 parent 005a66e commit 79c32d3
Show file tree
Hide file tree
Showing 47 changed files with 162 additions and 162 deletions.
6 changes: 3 additions & 3 deletions cache-requests/cache-requests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var connect = require("can-connect");
var getItems = require("can-connect/helpers/get-items");
var connect = require("../can-connect");
var getItems = require("../helpers/get-items");
var forEach = [].forEach;


Expand Down Expand Up @@ -280,6 +280,6 @@ var cacheRequestsBehaviour = connect.behavior("cache-requests",function(baseConn
module.exports = cacheRequestsBehaviour;

//!steal-remove-start
var validate = require("can-connect/helpers/validate");
var validate = require("../helpers/validate");
module.exports = validate(cacheRequestsBehaviour, ['getListData', 'cacheConnection']);
//!steal-remove-end
6 changes: 3 additions & 3 deletions cache-requests/cache-requests_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var QUnit = require("steal-qunit");
var cacheRequests = require("can-connect/cache-requests/");
var memCache = require("can-connect/data/memory-cache/");
var connect = require("can-connect");
var cacheRequests = require("../cache-requests/");
var memCache = require("../data/memory-cache/");
var connect = require("../can-connect");
var map = [].map;
var canSet = require("can-set-legacy");

Expand Down
4 changes: 2 additions & 2 deletions can-connect.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var connect = require("can-connect/connect");
var base = require("can-connect/base/base");
var connect = require("./connect");
var base = require("./base/base");
var ns = require("can-namespace");

connect.base = base;
Expand Down
4 changes: 2 additions & 2 deletions can/base-map/base-map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var connect = require("can-connect");
var connect = require("../../can-connect");

var constructor = require("../../constructor/constructor");
var canMap = require("../map/map");
Expand Down Expand Up @@ -33,7 +33,7 @@ connect.baseMap = function(options){
if($ && $.ajax) {
options.ajax = $.ajax;
}

return connect(behaviors,options);
};

Expand Down
2 changes: 1 addition & 1 deletion can/base-map/base-map_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var QUnit = require("steal-qunit");
var fixture = require("can-fixture");
var Map = require("can-map");
var baseMap = require("can-connect/can/base-map/");
var baseMap = require("./base-map");
var GLOBAL = require("can-globals/global/global");
var stealClone = require("steal-clone");
var QueryLogic = require("can-query-logic");
Expand Down
10 changes: 5 additions & 5 deletions can/constructor-hydrate/constructor-hydrate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ var QUnit = require('steal-qunit');
var DefineMap = require('can-define/map/map');
var DefineList = require('can-define/list/list');
var connect = require('can-connect');
var constructorBehavior = require('can-connect/constructor/constructor');
var constructorStore = require('can-connect/constructor/store/store');
var mapBehavior = require('can-connect/can/map/map');
var hydrateBehavior = require('can-connect/can/constructor-hydrate/constructor-hydrate');
var constructorBehavior = require('../../constructor/constructor');
var constructorStore = require('../../constructor/store/store');
var mapBehavior = require('../map/map');
var hydrateBehavior = require('./constructor-hydrate');

QUnit.module("can-connect/can/constructor-hydrate");

Expand Down Expand Up @@ -53,4 +53,4 @@ QUnit.test("Two objects with no id", function(){
QUnit.ok(!HubConnection.instanceStore.has(undefined), 'The instanceStore should not have an "undefined" key item');
var hub2 = new Hub({name: 'One'});
QUnit.ok(true, 'Should allow to create two instances without an id (no Max Call Stack error)');
});
});
2 changes: 1 addition & 1 deletion can/constructor-hydrate/constructor-hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
* ```
*/

var connect = require("can-connect");
var connect = require("../../can-connect");
var Construct = require("can-construct");

var constructorHydrateBehavior = connect.behavior("can-connect/can/construct-hydrate", function(baseConnect){
Expand Down
28 changes: 14 additions & 14 deletions can/map/define-map-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ var List = require("can-define/list/list");


// load connections
var constructor = require("can-connect/constructor/");
var canMap = require("can-connect/can/map/");
//var canRef = require("can-connect/can/ref/");
var constructorStore = require("can-connect/constructor/store/");
var dataCallbacks = require("can-connect/data/callbacks/");
var callbacksCache = require("can-connect/data/callbacks-cache/");
var combineRequests = require("can-connect/data/combine-requests/");
var localCache = require("can-connect/data/localstorage-cache/");
var dataParse = require("can-connect/data/parse/");
var dataUrl = require("can-connect/data/url/");
var fallThroughCache = require("can-connect/fall-through-cache/");
var realTime = require("can-connect/real-time/");

var connect = require("can-connect/can-connect");
var constructor = require("../../constructor/constructor");
var canMap = require("./map");
//var canRef = require("../../can/ref/ref");
var constructorStore = require("../../constructor/store/store");
var dataCallbacks = require("../../data/callbacks/callbacks");
var callbacksCache = require("../../data/callbacks-cache/callbacks-cache");
var combineRequests = require("../../data/combine-requests/combine-requests");
var localCache = require("../../data/localstorage-cache/localstorage-cache");
var dataParse = require("../../data/parse/parse");
var dataUrl = require("../../data/url/url");
var fallThroughCache = require("../../fall-through-cache/fall-through-cache");
var realTime = require("../../real-time/real-time");

var connect = require("../../can-connect");

var QUnit = require("steal-qunit");

Expand Down
26 changes: 13 additions & 13 deletions can/map/make-real-time-super-model.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
var constructor = require("can-connect/constructor/");
var canMap = require("can-connect/can/map/");
//var canRef = require("can-connect/can/ref/");
var constructorStore = require("can-connect/constructor/store/");
var dataCallbacks = require("can-connect/data/callbacks/");
var callbacksCache = require("can-connect/data/callbacks-cache/");
var combineRequests = require("can-connect/data/combine-requests/");
var localCache = require("can-connect/data/localstorage-cache/");
var dataParse = require("can-connect/data/parse/");
var dataUrl = require("can-connect/data/url/");
var fallThroughCache = require("can-connect/fall-through-cache/");
var realTime = require("can-connect/real-time/");
var connect = require("can-connect/can-connect");
var constructor = require("../../constructor/constructor");
var canMap = require("./map");
//var canRef = require("../../can/ref/ref");
var constructorStore = require("../../constructor/store/store");
var dataCallbacks = require("../../data/callbacks/callbacks");
var callbacksCache = require("../../data/callbacks-cache/callbacks-cache");
var combineRequests = require("../../data/combine-requests/combine-requests");
var localCache = require("../../data/localstorage-cache/localstorage-cache");
var dataParse = require("../../data/parse/parse");
var dataUrl = require("../../data/url/url");
var fallThroughCache = require("../../fall-through-cache/fall-through-cache");
var realTime = require("../../real-time/real-time");
var connect = require("../../can-connect");
var canSet = require("can-set-legacy");

module.exports = function(Todo, TodoList){
Expand Down
2 changes: 1 addition & 1 deletion can/map/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ var overwrite = function( connection, Constructor, overwrites) {
module.exports = canMapBehavior;

//!steal-remove-start
var validate = require("can-connect/helpers/validate");
var validate = require("../../helpers/validate");
module.exports = validate(
canMapBehavior,
[
Expand Down
28 changes: 14 additions & 14 deletions can/map/map_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ var Observation = require("can-observation");
var canReflect = require("can-reflect");

// load connections
var constructor = require("can-connect/constructor/");
var canMap = require("can-connect/can/map/");
var constructorStore = require("can-connect/constructor/store/");
var dataCallbacks = require("can-connect/data/callbacks/");
var callbacksCache = require("can-connect/data/callbacks-cache/");
var combineRequests = require("can-connect/data/combine-requests/");
var localCache = require("can-connect/data/localstorage-cache/");
var dataParse = require("can-connect/data/parse/");
var dataUrl = require("can-connect/data/url/");
var fallThroughCache = require("can-connect/fall-through-cache/");
var realTime = require("can-connect/real-time/");

var connect = require("can-connect/can-connect");
var constructor = require("../../constructor/constructor");
var canMap = require("./map");
var constructorStore = require("../../constructor/store/store");
var dataCallbacks = require("../../data/callbacks/callbacks");
var callbacksCache = require("../../data/callbacks-cache/callbacks-cache");
var combineRequests = require("../../data/combine-requests/combine-requests");
var localCache = require("../../data/localstorage-cache/localstorage-cache");
var dataParse = require("../../data/parse/parse");
var dataUrl = require("../../data/url/url");
var fallThroughCache = require("../../fall-through-cache/fall-through-cache");
var realTime = require("../../real-time/real-time");

var connect = require("../../can-connect");

var QUnit = require("steal-qunit");

var fixture = require("can-fixture");
var testHelpers = require("can-connect/test-helpers");
var testHelpers = require("../../test-helpers");
var map = [].map;


Expand Down
2 changes: 1 addition & 1 deletion can/map/test-real-time-super-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var canLog = require("can-log");
var canReflect = require("can-reflect");
var fixture = require("can-fixture");
// load connections
var testHelpers = require("can-connect/test-helpers");
var testHelpers = require("../../test-helpers");
var assign = canReflect.assignMap;
var map = [].map;
var later = testHelpers.later;
Expand Down
10 changes: 5 additions & 5 deletions can/merge/merge-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ var DefineMap = require('can-define/map/map');
var DefineList = require('can-define/list/list');
var set = require('can-set-legacy');

var connect = require('can-connect');
var canMap = require('can-connect/can/map/map');
var constructorBehavior = require('can-connect/constructor/constructor');
var constructorStore = require('can-connect/constructor/store/store');
var canMapMerge = require('can-connect/can/merge/merge');
var connect = require('../../can-connect');
var canMap = require('../map/map');
var constructorBehavior = require('../../constructor/constructor');
var constructorStore = require('../../constructor/store/store');
var canMapMerge = require('../merge/merge');

var QUnit = require('steal-qunit');

Expand Down
6 changes: 3 additions & 3 deletions can/merge/merge.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var smartMerge = require('can-diff/merge-deep/merge-deep');
var connectMap = require('can-connect/can/map/map');
var connectMap = require('../map/map');
var queues = require('can-queues');
var connect = require("can-connect");
var connect = require("../../can-connect");

console.warn("can-connect/can/merge/merge is deprecated. It's built into can-connect/can/map/map by default.");

Expand Down Expand Up @@ -102,6 +102,6 @@ var mergeBehavior = connect.behavior("can/merge",function(baseConnection){
module.exports = mergeBehavior;

//!steal-remove-start
var validate = require("can-connect/helpers/validate");
var validate = require("../../helpers/validate");
module.exports = validate(mergeBehavior, ['createdInstance', 'destroyedInstance', 'updatedInstance', 'updatedList']);
//!steal-remove-end
10 changes: 5 additions & 5 deletions can/ref/ref-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
var QUnit = require("steal-qunit");
var DefineMap = require("can-define/map/");
var DefineList = require("can-define/list/");
var constructorStore = require("can-connect/constructor/store/");
var constructor = require("can-connect/constructor/");
var canMap = require("can-connect/can/map/");
var canRef = require("can-connect/can/ref/");
var connect = require("can-connect");
var constructorStore = require("../../constructor/store/");
var constructor = require("../../constructor/");
var canMap = require("../../can/map/");
var canRef = require("../../can/ref/");
var connect = require("../../can-connect");

// connects the "raw" data to a a constructor function
// creates ways to CRUD the instances
Expand Down
6 changes: 3 additions & 3 deletions can/ref/ref.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@
*/


var connect = require("can-connect");
var WeakReferenceMap = require("can-connect/helpers/weak-reference-map");
var connect = require("../../can-connect");
var WeakReferenceMap = require("../../helpers/weak-reference-map");
var ObservationRecorder = require("can-observation-recorder");
var constructorStore = require("can-connect/constructor/store/store");
var constructorStore = require("../../constructor/store/store");
var define = require("can-define");
var canReflect = require("can-reflect");

Expand Down
2 changes: 1 addition & 1 deletion can/super-map/super-map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var connect = require("can-connect");
var connect = require("../../can-connect");

var constructor = require("../../constructor/constructor");
var canMap = require("../map/map");
Expand Down
2 changes: 1 addition & 1 deletion can/super-map/super-map_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var fixture = require("can-fixture");
var Map = require("can-map");
var DefineMap = require("can-define/map/map");
var DefineList = require("can-define/list/list");
var superMap = require("can-connect/can/super-map/");
var superMap = require("./super-map");
var set = require("can-set-legacy");
var GLOBAL = require("can-globals/global/global");
var stealClone = require("steal-clone");
Expand Down
8 changes: 4 additions & 4 deletions constructor/callbacks-once/callbacks-once.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* @return {Object} A `can-connect` connection containing the methods provided by `callbacks-once`.
*
*/
var connect = require("can-connect");
var sortedSetJSON = require("can-connect/helpers/sorted-set-json");
var connect = require("../../can-connect");
var sortedSetJSON = require("../../helpers/sorted-set-json");
var forEach = [].forEach;

// wires up the following methods
Expand Down Expand Up @@ -94,6 +94,6 @@ var callbacksOnceBehavior = connect.behavior("constructor/callbacks-once",functi
module.exports = callbacksOnceBehavior;

//!steal-remove-start
var validate = require("can-connect/helpers/validate");
var validate = require("../../helpers/validate");
module.exports = validate(callbacksOnceBehavior, callbacks);
//!steal-remove-end
//!steal-remove-end
18 changes: 9 additions & 9 deletions constructor/callbacks-once/callbacks-once_test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var connect = require("can-connect/can-connect");
var connect = require("../../can-connect");
var QUnit = require("steal-qunit");
var realTime = require("can-connect/real-time/");
var constructor = require("can-connect/constructor/");
var constructorStore = require("can-connect/constructor/store/");
var canMap = require("can-connect/can/map/");
var dataCallbacks = require("can-connect/data/callbacks/");
var url = require("can-connect/data/url/");
var callbacksOnce = require("can-connect/constructor/callbacks-once/");
var DefineMap = require('can-define/map/');
var realTime = require("../../real-time/real-time");
var constructor = require("../constructor");
var constructorStore = require("../store/store");
var canMap = require("../../can/map/map");
var dataCallbacks = require("../../data/callbacks/callbacks");
var url = require("../../data/url/url");
var callbacksOnce = require("./callbacks-once");
var DefineMap = require('can-define/map/map');
var DefineList = require('can-define/list/list');

QUnit.module("can-connect/callbacks-once");
Expand Down
6 changes: 3 additions & 3 deletions constructor/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
var canReflect = require("can-reflect");
var makeArray = canReflect.toArray;
var assign = canReflect.assignMap;
var WeakReferenceMap = require("can-connect/helpers/weak-reference-map");
var WeakReferenceMap = require("../helpers/weak-reference-map");
var updateDeepExceptIdentity = require("can-diff/update-deep-except-identity/update-deep-except-identity");
var idMerge = require("can-connect/helpers/id-merge");
var behavior = require("../../behavior");
var idMerge = require("../helpers/id-merge");
var behavior = require("../behavior");

module.exports = behavior("constructor",function(baseConnection){

Expand Down
6 changes: 3 additions & 3 deletions constructor/constructor_test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var QUnit = require("steal-qunit");
var fixture = require("can-fixture");
var persist = require("can-connect/data/url/");
var connect = require("can-connect/can-connect");
var constructor = require("can-connect/constructor/");
var persist = require("../data/url/url");
var connect = require("../can-connect");
var constructor = require("./constructor");
var assign = require("can-reflect").assignMap;
var QueryLogic = require("can-query-logic");

Expand Down
10 changes: 5 additions & 5 deletions constructor/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
* [can-connect/constructor/constructor.updatedInstance] which updates the shared instance properties with the new
* server data.
*/
var connect = require("can-connect");
var WeakReferenceMap = require("can-connect/helpers/weak-reference-map");
var WeakReferenceSet = require("can-connect/helpers/weak-reference-set");
var sortedSetJSON = require("can-connect/helpers/sorted-set-json");
var connect = require("../../can-connect");
var WeakReferenceMap = require("../../helpers/weak-reference-map");
var WeakReferenceSet = require("../../helpers/weak-reference-set");
var sortedSetJSON = require("../../helpers/sorted-set-json");
var eventQueue = require("can-event-queue/map/map");

// shared across all connections
Expand Down Expand Up @@ -766,6 +766,6 @@ constructorStore.requestCleanupDelay = 10;
module.exports = constructorStore;

//!steal-remove-start
var validate = require("can-connect/helpers/validate");
var validate = require("../../helpers/validate");
module.exports = validate(constructorStore, ['hydrateInstance', 'hydrateList', 'getList', 'get', 'save', 'destroy']);
//!steal-remove-end
Loading

0 comments on commit 79c32d3

Please sign in to comment.