Skip to content
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

Feature/convert to npm #89

Open
wants to merge 113 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
9b715a0
Refactors Space.Logger class to use arguments on Constructor, removes…
qejk Apr 19, 2016
03aef7d
Refactors Space.Module to: not use global Space.log, instantiate unde…
qejk Apr 19, 2016
dd32c4e
Moves temporarily Space.Logger code to coffeescript, adds support for…
qejk Apr 24, 2016
193f43b
Refactors code: moves methods to base Space.Logger.Addapter class, ad…
qejk Apr 24, 2016
c71872c
Adds default configuration from ENV to module configuration, sets min…
qejk Apr 24, 2016
a778812
Refactors
qejk Apr 24, 2016
c8ea9ea
Removes blank lines
qejk Apr 26, 2016
8942054
Moves instantiation of console transport to Space.Logger.WinstonAdapter
qejk Apr 26, 2016
64f90e0
Simplifies initialization of transports, adds dedicated method for pr…
qejk Apr 26, 2016
462bfef
Removes winston npm dependency
qejk Apr 26, 2016
dc4914f
Simplifies logging initialization by moving it to separate modules co…
qejk Apr 26, 2016
a48baa3
Moves coffeescript to ES6
qejk Apr 26, 2016
0cd08c6
Removes unnecessary variable
qejk May 7, 2016
e5a071a
Adds state related additional helper methods to Space.Logger
qejk May 7, 2016
e06d264
Changes injector mapping type
qejk May 7, 2016
37cafb0
Fixes module unit tests
qejk May 7, 2016
319b591
Refactors Space.Logger unit tests
qejk May 7, 2016
fa9c2dc
One semicolon here, one semicolon there...
qejk May 7, 2016
e2d7773
Merge branch 'develop' of https://github.com/meteor-space/base into f…
qejk Jan 7, 2017
d886a5b
Removes back winston dependency from meteor
qejk Jan 7, 2017
cbb3ca5
Refactors Logger
qejk Jan 7, 2017
07e5806
Updates .eslintrc
qejk Jan 7, 2017
4118033
Adds package.json
qejk Jan 7, 2017
8b916fe
Removes tightly coupled Meteor deps
qejk Jan 7, 2017
63bbea2
Replaces used Meteor deps in favor of importable npm packages
qejk Jan 7, 2017
f46f9d8
Exports Space modules
qejk Jan 9, 2017
5a0c432
Imports Space modules on tests
qejk Jan 9, 2017
39532d7
Standardizes file naming convention
qejk Jan 10, 2017
3fe3df1
Sets npm dependencies versions to minor
qejk Jan 10, 2017
e3af6bc
Converts injector-annotations
qejk Jan 10, 2017
35ad270
Converts namespace
qejk Jan 10, 2017
84aea80
Converts helpers
qejk Jan 10, 2017
4e45a48
Imports Struct module on Space error and removes it from global Space
qejk Jan 10, 2017
bad61c9
Converts Injector, imports SpaceError and removes Injector from Space…
qejk Jan 10, 2017
27416ab
Converts Module and removes it from Space global
qejk Jan 10, 2017
fcd9388
Replaces Space.Object with imported SpaceObject module
qejk Jan 10, 2017
0420d48
Exports SpaceObject and removes Object from Space global
qejk Jan 10, 2017
5b7724c
Converts Application and removes it from Space global
qejk Jan 10, 2017
8fc3af0
Fixes import statement pointing to incorrect file
qejk Jan 10, 2017
18c97c5
Converts bdd-api
qejk Jan 10, 2017
6298b90
Combines namespace and helpers in to single Space file
qejk Jan 10, 2017
399f602
Fixes issue with unexportable SpaceObject module with ES6
qejk Jan 10, 2017
b478b9c
Removes namespace
qejk Jan 10, 2017
9a1a25a
Imports Space and replaces global related calls
qejk Jan 10, 2017
f165a99
Adds index
qejk Jan 10, 2017
15fec86
Updates file paths on meteor package
qejk Jan 10, 2017
09b729b
Imports modules on tests
qejk Jan 10, 2017
dbbb128
Updates CircleCI
qejk Jan 10, 2017
08db363
Adds getnv directly via import
qejk Jan 10, 2017
9bb64d5
Removes getenv and configuration, Pins node to >=4.0.0
qejk Jan 10, 2017
15cdb0c
Updates CircleCI
qejk Jan 10, 2017
9e4637c
Updates npm dependencies and CircleCI
qejk Jan 11, 2017
35e5b62
Converts Struct unit test
qejk Jan 11, 2017
ed11964
Converts SpaceObject unit test
qejk Jan 11, 2017
450580d
Converts Module unit test
qejk Jan 11, 2017
9ef2712
Converts Injector unit test
qejk Jan 11, 2017
2fc614b
Converts helpers unit test
qejk Jan 11, 2017
37cfbe2
Fixes variables declarations
qejk Jan 11, 2017
8eee8d9
Converts Application unit test
qejk Jan 11, 2017
c01ceb4
Fixes variables declarations
qejk Jan 11, 2017
d44dfa3
Updates package.json with: keywords, contributors, Pins npm to >= 1.4.*
qejk Jan 11, 2017
4490b2d
Updates meteor package.js with new file paths
qejk Jan 11, 2017
05d1adc
Adds a fallback to SpaceObject for ES6 class definitions
qejk Jan 11, 2017
227fceb
Fixes variables declarations
qejk Jan 11, 2017
05d2e80
Updates testing driver to Mocha
qejk Jan 11, 2017
1e928db
Updates tests to run with Mocha
qejk Jan 11, 2017
d8e362a
Skips temporarily Meteor oriented tests
qejk Jan 11, 2017
910a51a
Fixes CircleCI configuration for Mocha for failing tests with updated…
qejk Jan 11, 2017
e4412a5
Converts SpaceObject
qejk Jan 11, 2017
86ea282
Converts Struct
qejk Jan 11, 2017
ae476d7
Updates imports to use converted SpaceObject, replaces tests with cha…
qejk Jan 11, 2017
d81fc1e
Fixes issue with SpaceError and ES6 not supporting binded class insta…
qejk Jan 11, 2017
01a3ced
Removes unused file from meteor package
qejk Jan 11, 2017
4867c31
Fixes uncecessary fallbacks, refactors __extends__ from SpaceObject
qejk Jan 11, 2017
59f73e7
Updates babel, adds test script to npm
qejk Jan 12, 2017
0baf369
Fixes colon in .babelrc
qejk Jan 12, 2017
3e91d80
Updates babel
qejk Jan 12, 2017
ad8c7f6
Fixes variables declarations
qejk Jan 12, 2017
a4889c3
Fixes variable declarations
qejk Jan 12, 2017
0db3289
Adds sinon-chai to npm package
qejk Jan 12, 2017
47699d9
Fixes SpaceObject and test
qejk Jan 12, 2017
5b5948f
Updates CircleCI to use npm mocha instead of spacejam
qejk Jan 12, 2017
3aeceea
Fixes Module, Injector and tests
qejk Jan 12, 2017
2b42b59
Renames custom chai assert ‘toMatch’ to chainable ‘sameAs’
qejk Jan 12, 2017
8012fdb
Add .gitignore file
darko-mijic Jan 12, 2017
290a216
Merge branch 'feature/convert-to-es6' of https://github.com/meteor-sp…
darko-mijic Jan 12, 2017
160a8e9
Add space-testing as github npm dependency and introduce global test …
darko-mijic Jan 12, 2017
8765bc2
Updates CircleCI
qejk Jan 12, 2017
3c48c7c
Renames tests folder to test for Mocha and mocha.opts
qejk Jan 12, 2017
8e628a6
Fixes incorrect plugin load order breaking tests
qejk Jan 12, 2017
0561a60
Moves injector annotations to space file
qejk Jan 12, 2017
cd29ddd
Fixes incorrect variable name in __extend__ from SpaceObject
qejk Jan 12, 2017
ca212f3
Adds global sinon for testing
qejk Jan 12, 2017
9a396fe
Changes file extension from tests.js to unit.js; fixes variable decla…
qejk Jan 12, 2017
de55bb8
Fixes variable declarations
qejk Jan 12, 2017
a0c70bf
Replaces unavailable Object.values from ES7 to lodash.values
qejk Jan 12, 2017
c6590ac
Adds global fallback
qejk Jan 12, 2017
8253de8
Git \n/ gore!
qejk Jan 13, 2017
e75f764
Standardizes file naming convention
qejk Jan 13, 2017
9c9e981
Updates npm script ‘test’ to use new tests path
qejk Jan 13, 2017
3611b63
Updates CircleCI
qejk Jan 13, 2017
d4b028a
Moves files from source to src
qejk Jan 13, 2017
d3296c4
Updates common.js to use new modular approach of space-testing
qejk Jan 13, 2017
1868acc
Fixes issue with package not being transpiled by Babel before running…
qejk Jan 13, 2017
bba127f
Updates CircleCI
qejk Jan 13, 2017
a2cc1e5
Removes preset from Babels compilation
qejk Jan 13, 2017
256515f
Changes file paths on tests to use transpiled version of lib
qejk Jan 13, 2017
4b369fe
Fixes issue with SpaceError not passing arguments to construct callbacks
qejk Jan 13, 2017
532859f
Changes temporarily Module publication
qejk Jan 13, 2017
c8cae37
Adds build script to npm
qejk Jan 14, 2017
ed0987b
Updates CircleCI to not cache node_modules
qejk Jan 14, 2017
1315eb2
Fixes reference to pinned space-testing package
qejk Jan 14, 2017
34a0351
Changes construction super testing approach on Struct unit test
qejk Jan 14, 2017
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
9 changes: 7 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"plugins": ["transform-decorators-legacy"]
}
"plugins": [
"transform-decorators-legacy"
],
presets: [
["es2015", {"loose": true}]
]
}
5 changes: 2 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,10 @@
"before": false,
"after": true
}],
"space-after-keywords": 2, // http://eslint.org/docs/rules/space-after-keywords
"keyword-spacing": 2, // http://eslint.org/docs/rules/space-after-keywords
"space-before-blocks": 2, // http://eslint.org/docs/rules/space-before-blocks
"space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren
"space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops
"space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case
"spaced-comment": 2, // http://eslint.org/docs/rules/spaced-comment (previously known as spaced-line-comment)
}
}
}
26 changes: 0 additions & 26 deletions .npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
machine:
node:
version: 0.10.33
pre:
- curl https://install.meteor.com | /bin/sh
version: 6.0.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do to:

    for (let [index, struct] of ObjectEntries(actual)) {
                             ^^

SyntaxError: Unexpected identifier

Can't figure out why this works above 6.0.0, tried 4.0.0, 5.0.0 and one from 0.10.* - no luck. This should work on those versions. babel/babel#5041


dependencies:
pre:
- npm install -g spacejam
override:
- npm install

test:
override:
- spacejam test-packages ./
- npm test
89 changes: 37 additions & 52 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,102 +7,87 @@ Package.describe({
});

Npm.depends({
"getenv": "0.5.0",
"winston": "2.1.0",
"babel-plugin-transform-decorators-legacy": "1.3.4"
});

Package.onUse(function(api) {

api.versionsFrom('1.2.0.1');
api.versionsFrom('1.4.2');

api.use([
'coffeescript',
'check',
'underscore',
'ecmascript'
]);

api.use([
'ejson',
'ddp',
'random',
'mongo',
'tracker',
'templating',
'session',
'blaze',
'email',
'accounts-base',
'reactive-var'
], {weak: true});

api.addFiles([
'source/lib/underscore_deep_extend_mixin.js',
'source/namespace.coffee',
'source/helpers.coffee',
'source/configuration.js',
'source/object.coffee',
'source/lib/underscore-deep-extend-mixin.js',
'source/space.js',
'source/object.js',
'source/logger.js',
'source/struct.coffee',
'source/struct.js',
'source/error.js',
'source/injector.coffee',
'source/injector_annotations.coffee',
'source/module.coffee',
'source/application.coffee'
'source/injector.js',
'source/injector-annotations.js',
'source/module.js',
'source/application.js',
'source/loggers/adapter.js',
'source/loggers/console-adapter.js',
'source/index.js',
'source/meteor.js'
]);

// Test helpers
api.addFiles([
'source/testing/bdd-api.coffee'
'source/testing/bdd-api.js'
]);

api.export([
'SpaceObject',
'Struct',
'SpaceError',
'Injector',
'InjectionError',
'Logger',
'LoggingAdapter',
'ConsoleLogger',
'Module',
'Application',
'Space'
]);
});

Package.onTest(function(api) {

api.use([
'meteor',
'coffeescript',
'check',
'ecmascript',
'space:base',

// weak-dependencies
'ddp',
'random',
'underscore',
'mongo',
'tracker',
'templating',
'ejson',
'accounts-base',
'email',
'session',
'reactive-var',
'practicalmeteor:[email protected]',
'practicalmeteor:[email protected]_6',
'practicalmeteor:[email protected]_1',
'practicalmeteor:[email protected]_2',

'space:[email protected]'
]);

api.addFiles([

// unit tests
'tests/unit/object.unit.coffee',
'tests/unit/module.unit.coffee',
'tests/unit/struct.unit.coffee',
'tests/unit/application.unit.coffee',
'tests/unit/injector.unit.coffee',
'tests/unit/object.unit.js',
'tests/unit/module.unit.js',
'tests/unit/struct.unit.js',
'tests/unit/application.unit.js',
'tests/unit/injector.unit.js',
'tests/unit/injector_annotations.unit.js',
'tests/unit/helpers.unit.coffee',
'tests/unit/helpers.unit.js',
'tests/unit/error.tests.js',
'tests/unit/logger.tests.js',

// integration tests
'tests/integration/application_with_modules.spec.js',
'tests/integration/standalone_application.integration.coffee',
'tests/integration/lifecycle_hooks.tests.js',
'tests/integration/requiring-modules.tests.js',
'tests/integration/module.regressions.js'
]);

});
57 changes: 57 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "space-base",
"version": "4.1.4",
"description": "Modular Application Architecture",
"keywords": [
"space",
"modular",
"architecture",
"dependencies",
"dependency",
"injection",
"di",
"ioc",
"inversion of control"
],
"author": "Dominik Guzei, Rhys Bartels-Waller, Darko Mijic, Adam Desivi",
"contributors": [
"Dominik Guzei (https://github.com/DominikGuzei)",
"Rhys Bartels-Waller (https://github.com/rhyslbw)",
"Darko Mijić (https://github.com/darko-mijic)",
"Jonas Aschenbrenner (https://github.com/Sanjo)",
"Adam Desivi (https://github.com/qejk)"
],
"license": "MIT",
"engines": {
"node": ">= 4.0.x",
"npm": ">= 1.4.x"
},
"repository": {
"type": "git",
"url": "git://github.com/meteor-space/base.git"
},
"dependencies": {
"underscore": "^1.8.0",
"simplecheck": "git://github.com/qejk/simplecheck.git",
"lodash": "^4.17.0"
},
"devDependencies": {
"babel-core": "^6.21.0",
"babel-cli": "^6.18.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-es2015": "^6.14.0",
"chai": "^3.5.0",
"sinon": "^1.17.7",
"sinon-chai": "^2.8.0",
"mocha": "^3.2.0",
"space-testing": "git://github.com/meteor-space/testing.git#feature\/convert-to-npm"

},
"scripts": {
"build": "npm run compile",
"compile": "./node_modules/.bin/babel -d lib/ src/",
"prepublish": "npm run compile",
"test": "npm run compile && node_modules/mocha/bin/mocha --require babel-core/register --recursive test/**/*.js",
"test-watch": "npm test -- --watch"
}
}
20 changes: 0 additions & 20 deletions source/application.coffee

This file was deleted.

40 changes: 0 additions & 40 deletions source/configuration.js

This file was deleted.

49 changes: 0 additions & 49 deletions source/error.js

This file was deleted.

Loading