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

@fanoutio/grip

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fanoutio/grip - npm Package Compare versions

Comparing version 2.0.0-beta.0 to 2.0.0-rc.0

build/data/Channel.d.ts

48

CHANGELOG.md

@@ -1,4 +0,48 @@

node-grip CHANGE LOG
===================
# js-grip Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [Planned for 2.0.0]
Major update with great improvements in usability, with support for modern
language features such as `class` and `async`/`await`. Now also uses
`@fanoutio/pubcontrol@2`.
### To be Added
- To add Typescript annotations for IDE completion and static type checking.
### To be Changed
### To be Removed
## [2.0.0-beta.0] - 2020-01-13
### Added
- Added ESM build. Uses Rollup (https://rollupjs.org/) to build bundles for consumption as
CommonJS, ESM, and the Browser.
- Added new simple NodeJS based demo, providing a server and a publisher, designed
to be used with pushpin (https://pushpin.org).
- Added a shimmed `Buffer` object to browser build, as it is needed during JWT authorization.
- IDE metadata for IntelliJ IDEA.
### Changed
- Repository now called `js-grip` to reflect that this is useful in all types of JavaScript,
including the browser.
- Now distributed as a public scoped package `@fanouio/grip`.
- Source files and tests rewritten in modern style JavaScript
- Source files moved from `/lib` to `/src`
- Basic data structures now using ES6 classes.
- Start using "changelog" over "change log" since it's the common usage.
- Bump major version to 2 to indicate that this is a modernized new version.
- Improved README by being more straightforward with the basic use case.
- `GripPubControl` now directory inherits from `PubControl`.
- `GripPubControl.publish` API has been changed, and the callback is now optional.
If no callback is provided, a Promise is returned instead.
### Removed
## Older entries
v 0.1.0 04-03-2013 - Initial Release. Formats, Channel, Response, Publisher.

@@ -5,0 +49,0 @@ v 0.1.1 04-16-2013 - Fixed serious bug in Response that was preventing proper JSON generation.

2

demo/publish.js
// DEMO - Publishes test message to backend running behind Pushpin.
// See README.md for directions on running this demo.
const { GripPubControl } = require('../commonjs');
const { GripPubControl } = require('..');

@@ -5,0 +5,0 @@ const uri = "http://localhost:5561/";

// DEMO - Server for js-grip demo
const http = require('http');
const { createGripChannelHeader } = require('../commonjs');
const { createGripChannelHeader } = require('..');

@@ -5,0 +5,0 @@ const port = 3000;

{
"name": "@fanoutio/grip",
"version": "2.0.0-beta.0",
"version": "2.0.0-rc.0",
"author": "Fanout, Inc. <info@fanout.io>",

@@ -16,11 +16,7 @@ "description": "GRIP Interface Library",

],
"type": "commonjs",
"main": "./esm/main.mjs",
"module": "./esm/main.mjs",
"main": "./build/index.js",
"module": "./build/index.es.js",
"scripts": {
"prepublishOnly": "npm run build",
"build": "npm run build-esm && npm run build-commonjs && npm run build-browser",
"build-esm": "npm run build-esm:clean && npm run build-esm:build",
"build-esm:clean": "rimraf esm",
"build-esm:build": "rollup -c rollup.esm.config.js",
"build": "npm run build-commonjs && npm run build-browser",
"build-commonjs": "npm run build-commonjs:clean && npm run build-commonjs:build",

@@ -33,4 +29,4 @@ "build-commonjs:clean": "rimraf commonjs",

"lint": "npm run lint:eslint",
"lint:eslint": "eslint --ext=.js,.mjs src/* tests/*",
"test": "node --experimental-modules tests/index.mjs"
"lint:eslint": "eslint --ext=.js src/* tests/*",
"test": "TS_NODE_FILES=true TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' mocha -r ts-node/register tests/*.ts"
},

@@ -52,3 +48,3 @@ "repository": {

"dependencies": {
"@fanoutio/pubcontrol": "^2.0.0-beta.9",
"@fanoutio/pubcontrol": "^2.1.2",
"jspack": "0.0.4",

@@ -58,22 +54,20 @@ "jwt-simple": "^0.5.6"

"devDependencies": {
"@babel/core": "^7.7.5",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.7.6",
"@babel/preset-env": "^7.7.6",
"@babel/runtime-corejs3": "^7.7.6",
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-replace": "^2.3.0",
"babel-eslint": "^10.0.3",
"buffer": "^5.4.3",
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-replace": "^2.3.1",
"@rollup/plugin-typescript": "^3.0.0",
"@types/mocha": "^7.0.2",
"builtin-modules": "^3.1.0",
"core-js": "^3.6.3",
"eslint": "^6.7.2",
"regenerator-runtime": "^0.13.3",
"eslint": "^6.8.0",
"mocha": "^7.1.1",
"rimraf": "^3.0.0",
"rollup": "^1.29.0",
"rollup-plugin-babel": "^4.3.3",
"rollup": "^1.32.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^5.2.0"
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-peer-deps-external": "^2.2.2",
"rollup-plugin-typescript2": "^0.26.0",
"ts-node": "^8.6.2",
"tslib": "^1.11.1",
"typescript": "^3.8.3"
},

@@ -80,0 +74,0 @@ "license": "MIT",

@@ -5,8 +5,8 @@ import nodeGlobals from 'rollup-plugin-node-globals';

import nodeResolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
import json from '@rollup/plugin-json';
import replace from '@rollup/plugin-replace';
import typescript from '@rollup/plugin-typescript';
export default {
input: 'src/main.browser.mjs',
input: 'src/main.browser.ts',
output: {

@@ -25,3 +25,10 @@ file: 'browser/grip.js',

}),
commonjs(),
commonjs({
namedExports: {
// left-hand side can be an absolute path, a path
// relative to the current directory, or the name
// of a module in node_modules
'jwt-simple': ['encode', 'decode'],
}
}),
nodeGlobals(),

@@ -33,24 +40,4 @@ nodeBuiltins(),

json(),
babel({
babelrc: false,
exclude: 'node_modules/**', // only transpile our source code
runtimeHelpers: true,
presets: [
['@babel/preset-env', {
useBuiltIns: 'entry',
corejs: 3,
modules: false,
targets: {
ie: '11',
},
}],
],
plugins: [
'@babel/plugin-proposal-class-properties',
["@babel/plugin-transform-runtime", {
corejs: 3,
}],
],
}),
typescript({lib: ["es5", "dom", "es6"], target: "es5"}),
],
};

@@ -1,37 +0,42 @@

import commonjs from '@rollup/plugin-commonjs';
import babel from 'rollup-plugin-babel';
import commonjs from '@rollup/plugin-commonjs'
import external from 'rollup-plugin-peer-deps-external'
import json from '@rollup/plugin-json';
import builtins from 'builtin-modules';
import replace from "@rollup/plugin-replace";
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json'
export default {
input: 'src/main.commonjs.mjs',
output: {
file: 'commonjs/index.js',
format: 'cjs'
},
input: 'src/main.ts',
output: [
{
file: pkg.main,
format: 'cjs',
exports: 'named',
sourcemap: true
},
{
file: pkg.module,
format: 'es',
exports: 'named',
sourcemap: true
}
],
plugins: [
replace({
include: ['src/**'],
delimiters: ['', ''],
values: {
"'@fanoutio/pubcontrol'": "'@fanoutio/pubcontrol/commonjs'",
},
external(),
typescript({
rollupCommonJSResolveHack: true,
exclude: '**/__tests__/**',
clean: true,
}),
commonjs(),
commonjs({
include: ['node_modules/**'],
namedExports: {
// left-hand side can be an absolute path, a path
// relative to the current directory, or the name
// of a module in node_modules
'jwt-simple': ['encode'],
}
}),
json(),
babel({
babelrc: false,
exclude: 'node_modules/**', // only transpile our source code
plugins: [
'@babel/plugin-proposal-class-properties',
],
}),
],
external: [
...builtins,
'jspack',
'jwt-simple',
'@fanoutio/pubcontrol/commonjs',
],
};
]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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