New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grex

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grex - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

client/grex.min.js

11

CHANGES.md
## TODO (upcoming releases)
- Option to not use Transaction to do CUD (ie No need for commit()). eg. g.addVertex().then(); Batch kibble will not required for these calls
- Client version initialised with var g = require('grex');
- Test CUD
- Option to not use Transaction to do CUD (ie No need for commit()). eg. g.addVertex().then(); Batch kibble will not be required for these calls
##0.3.0
## 0.3.1
- Add support for addProperty and setProperty for Vertex and Edge
## 0.3.0
- Expose gRex as global for browser version.
- Enable to be used with RequireJS.
##0.2.5
## 0.2.5
- Structural changes

@@ -12,0 +13,0 @@ - Add Contributors to package.json

@@ -1,2 +0,2 @@

var grex = require('../src/grex.js');
var grex = require('../index.js');
var t1, t2;

@@ -15,2 +15,4 @@ var trxn;

t1 = trxn.addVertex({name:'Test1a', age:20});
t1.addProperty('name2', 'testa').addProperty('name3', 'test3');
t1.setProperty('name2','updated');
t2 = trxn.addVertex({name:'Test2a', age:'30'});

@@ -17,0 +19,0 @@ trxn.addEdge(t1, t2, 'linked', {name:"ALabel", weight:1.2})

module.exports = function(grunt){
//Need to work out how to include browserify & uglify
//gRex Global in browser
//browserify ./index.js --standalone gRex -o ./browser/bundle.js
//uglifyjs ./browser/bundle.js -o ./browser/grex.min.js
// Project configuration.

@@ -13,7 +8,7 @@ grunt.initConfig({

options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'src/<%= pkg.name %>.js',
dest: 'build/<%= pkg.name %>.min.js'
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'client/bundle.js',
dest: 'client/<%= pkg.name %>.min.js'
}

@@ -29,3 +24,3 @@ },

},
// Configure a mochaTest task
// Configure a mochaTest task
mochaTest: {

@@ -42,12 +37,10 @@ test: {

},
browserify2: {
dev: {
entry: './build/entry.js',
mount: '/application.js',
server: './build/server.js',
debug: true
},
compile: {
entry: './build/entry.js',
compile: './public/application.js'
browserify: {
build: {
src: ['index.js'],
dest: 'client/bundle.js',
options: {
standalone: 'gRex',
debug: false
}
}

@@ -62,13 +55,11 @@ }

// Load the plugin that provides the "browserify" task.
grunt.loadNpmTasks('grunt-browserify2');
// Load the plugin that provides the "mocha/phantomjs" task.
// grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-browserify');
// Add the grunt-mocha-test tasks.
grunt.loadNpmTasks('grunt-mocha-test');
// Default task(s).
grunt.registerTask('default', ['jshint', 'grunt-mocha-test', 'browserify2:dev']);
grunt.registerTask('compile', 'browserify2:compile');
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('build', ['jshint', 'browserify:build', 'uglify']);
grunt.registerTask('test', ['mochaTest']);
};
{
"name": "grex",
"description": "Client for Rexster Graph Server",
"version": "0.3.0",
"version": "0.3.1",
"keywords": [

@@ -16,3 +16,3 @@ "database",

"contributors": [
{
{
"name": "Jean Baptiste-Musso",

@@ -41,7 +41,8 @@ "email": "<jbmusso+github@gmail.com>"

"grunt-contrib-jshint": "~0.6.0",
"grunt-browserify": "~1.2.1",
"grunt-mocha": "~0.4.0",
"grunt-mocha-test": "~0.6.2",
"grunt-browserify2": "~0.1.8"
"browserify": "~2.34.1",
"grunt-browserify": "~1.2.9",
"should": "~2.0.1"
}
}

@@ -28,3 +28,3 @@ gRex

- a ``<script>`` tag in the browser. Files are located in the browser directory.
- a ``<script>`` tag in the browser. Files are located in the client directory.

@@ -31,0 +31,0 @@ ```

@@ -32,3 +32,2 @@ var q = require("q"),

module.exports = (function () {

@@ -42,2 +41,19 @@ function Trxn(options, typeMap) {

//Vertex or Edge node
var Node = (function(){
function Node(obj) {
this._obj = obj;
}
Node.prototype = {
addProperty: function (k, v){
this._obj[k] = v;
return this;
},
setProperty: function (k, v){
this._obj[k] = v;
return this;
}
};
return Node;
})();

@@ -119,4 +135,6 @@ function addTypes(obj, typeDef, embedded, list){

function cud(action, type) {
return function() {
var o = {},
vertex,
argLen = arguments.length,

@@ -139,4 +157,4 @@ i = 0,

}
o._outV = arguments[0 + i];
o._inV = arguments[1 + i];
o._outV = arguments[0 + i]._obj;
o._inV = arguments[1 + i]._obj;
o._label = arguments[2 + i];

@@ -168,4 +186,3 @@ } else {

}
return o;
return new Node(o);
};

@@ -367,3 +384,3 @@ }

deferred.reject(e);
})
});

@@ -370,0 +387,0 @@ // write data to request body

@@ -1,2 +0,2 @@

var graphRegex = /^T\.(gt|gte|eq|neq|lte|lt|decr|incr|notin|in)$|^Contains\.(IN|NOT_IN)$|^g\.|^Vertex(?=\.class\b)|^Edge(?=\.class\b)/;
var graphRegex = /^T\.(gt|gte|eq|neq|lte|lt|decr|incr|notin|in)$|^Contains\.(IN|NOT_IN)$|^g\.|^Vertex(\.class)$|^Edge(\.class)$/;
var closureRegex = /^\{.*\}$/;

@@ -3,0 +3,0 @@

@@ -11,3 +11,2 @@ var gRex = require('../index.js'),

.then(function(result){
console.log(g);
g = result;

@@ -14,0 +13,0 @@ done();

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc