Skip to content

Commit

Permalink
Release version 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Danang Galuh Tegar Prasetyo committed Dec 8, 2021
1 parent d4cbb18 commit 56de7eb
Show file tree
Hide file tree
Showing 22 changed files with 7,207 additions and 7,450 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
},
extends: ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
rules: {},
}
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,11 @@ test

# Coveralls configuration
.coveralls.yml

# eslint configuration
.eslintrc.js
.prettierrc.js

# Yarn
.yarn
.pnp*
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
semi: false,
trailingComma: "all",
singleQuote: false,
printWidth: 120,
useTabs: true,
tabWidth: 4,
};
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

363 changes: 363 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

768 changes: 768 additions & 0 deletions .yarn/releases/yarn-3.1.1.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.1.1.cjs
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## Changes Log (What's New)

Latest Legacy: [![Legacy Version](https://img.shields.io/npm/v/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy)

**What's New in 2.5.1 (latest legacy)**

* Improving typings.
* Add eslint and prettier for code cleaning.
* Upgrade devDependencies.

**What's New in 2.5.0**

* As the same with `2.4.1`, but rollback `crypto-js` dependency to version `3.3.0` to maintain compatibility with environment that does not support native crypto module.
Expand Down
20 changes: 7 additions & 13 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SimpleCrypto

[![GitHub Release](https://img.shields.io/github/release/danang-id/simple-crypto-js.svg)](https://github.com/danang-id/simple-crypto-js/releases)
[![Build Status](https://travis-ci.org/danang-id/simple-crypto-js.svg?branch=master)](https://travis-ci.org/danang-id/simple-crypto-js)
[![Build Distribution](https://github.com/danang-id/simple-crypto-js/actions/workflows/build-distribution.yml/badge.svg)](https://github.com/danang-id/simple-crypto-js/actions/workflows/build-distribution.yml)
[![Coverage Status](https://coveralls.io/repos/github/danang-id/simple-crypto-js/badge.svg?branch=master)](https://coveralls.io/github/danang-id/simple-crypto-js?branch=master)
[![Dependencies Status](https://img.shields.io/librariesio/release/npm/simple-crypto-js)](https://www.npmjs.com/package/simple-crypto-js?activeTab=dependencies)
[![Dependencies Status](https://img.shields.io/librariesio/release/npm/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy?activeTab=dependencies)

[![NPM Version](https://img.shields.io/npm/v/simple-crypto-js.svg)](https://www.npmjs.com/package/simple-crypto-js?activeTab=versions)
[![NPM Version](https://img.shields.io/npm/v/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy)
[![License](https://img.shields.io/npm/l/simple-crypto-js.svg)](#license)
[![Monthly Downloads](https://img.shields.io/npm/dm/simple-crypto-js.svg)](https://www.npmjs.com/package/simple-crypto-js)
[![Monthly Downloads](https://img.shields.io/npm/dm/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy)

**_SimpleCrypto_** is a JavaScript library that simplify the process of encryption and decryption of JavaScript objects, as simple as just calling `encrypt()` and `decrypt()` function. This library implements brix's [crypto-js](https://github.com/brix/crypto-js) library. This library is pure JavaScript library built with TypeScript targeting CommonJS ECMAScript 5 (ES5), so it is compatible with most NodeJS back-end applications or JavaScript front-end (client browser).

Expand All @@ -17,24 +17,18 @@

SimpleCrypto v2.3.0 onward will use a new algorithm, because the older one was vulnerable to chosen cipher attack. Any **data that encrypted using v2.2.0 and earlier will NOT be able to be decrypted using v2.3.0 onward**; vice versa: data encrypted using v2.3.0 onward will NOT be able to be decrypted using v2.2.0 and earlier.

**v3.0.0: New Native Crypto Module**

SimpleCrypto v3.0.0 onward will use new `crypto-js` dependency version `^4.0.0`. This version of `crypto-js` replaces `Math.random()` method with native crypto module. Because of this, **SimpleCrypto might not be able to run on some environments without native crypto module support, such as IE 10 (and earlier) or React Native**.

Please [read more here](https://github.com/brix/crypto-js#400).

## Getting Started

This library is available through [jsDelivr CDN](https://cdn.jsdelivr.net/npm/simple-crypto-js@2.5.0/dist/SimpleCrypto.min.js) and package manager (like [npm](https://www.npmjs.org/) or [yarn](https://www.yarnpkg.com/)).
This library is available through [jsDelivr CDN](https://cdn.jsdelivr.net/npm/simple-crypto-js@legacy/dist/SimpleCrypto.min.js) and package manager (like [npm](https://www.npmjs.org/) or [yarn](https://www.yarnpkg.com/)).

### Vanilla JavaScript + HTML

To get started, add SimpleCrypto script to your HTML page. Only SimpleCrypto prior to version 3.0.0 is supported.
To get started, add SimpleCrypto script to your HTML page. **Only legacy version of SimpleCrypto is supported.**

```html
<head>
<!-- Another line -->
<script src="//cdn.jsdelivr.net/npm/simple-crypto-js@2.5.0/dist/SimpleCrypto.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/simple-crypto-js@legacy/dist/SimpleCrypto.min.js"></script>
<!-- Another line -->
</head>
```
Expand Down
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SimpleCrypto

[![GitHub Release](https://img.shields.io/github/release/danang-id/simple-crypto-js.svg)](https://github.com/danang-id/simple-crypto-js/releases)
[![Build Status](https://travis-ci.org/danang-id/simple-crypto-js.svg?branch=master)](https://travis-ci.org/danang-id/simple-crypto-js)
[![Build Distribution](https://github.com/danang-id/simple-crypto-js/actions/workflows/build-distribution.yml/badge.svg)](https://github.com/danang-id/simple-crypto-js/actions/workflows/build-distribution.yml)
[![Coverage Status](https://coveralls.io/repos/github/danang-id/simple-crypto-js/badge.svg?branch=master)](https://coveralls.io/github/danang-id/simple-crypto-js?branch=master)
[![Dependencies Status](https://img.shields.io/librariesio/release/npm/simple-crypto-js)](https://www.npmjs.com/package/simple-crypto-js?activeTab=dependencies)
[![Dependencies Status](https://img.shields.io/librariesio/release/npm/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy?activeTab=dependencies)

[![NPM Version](https://img.shields.io/npm/v/simple-crypto-js.svg)](https://www.npmjs.com/package/simple-crypto-js?activeTab=versions)
[![NPM Version](https://img.shields.io/npm/v/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy)
[![License](https://img.shields.io/npm/l/simple-crypto-js.svg)](#license)
[![Monthly Downloads](https://img.shields.io/npm/dm/simple-crypto-js.svg)](https://www.npmjs.com/package/simple-crypto-js)
[![Monthly Downloads](https://img.shields.io/npm/dm/simple-crypto-js/legacy.svg)](https://www.npmjs.com/package/simple-crypto-js/v/legacy)

**_SimpleCrypto_** is a JavaScript library that simplify the process of encryption and decryption of JavaScript objects, as simple as just calling `encrypt()` and `decrypt()` function. This library implements brix's [crypto-js](https://github.com/brix/crypto-js) library. This library is pure JavaScript library built with TypeScript targeting CommonJS ECMAScript 5 (ES5), so it is compatible with most NodeJS back-end applications or JavaScript front-end (client browser).

Expand All @@ -17,12 +17,6 @@

SimpleCrypto v2.3.0 onward will use a new algorithm, because the older one was vulnerable to chosen cipher attack. Any **data that encrypted using v2.2.0 and earlier will NOT be able to be decrypted using v2.3.0 onward**; vice versa: data encrypted using v2.3.0 onward will NOT be able to be decrypted using v2.2.0 and earlier.

**v3.0.0: New Native Crypto Module**

SimpleCrypto v3.0.0 onward will use new `crypto-js` dependency version `^4.0.0`. This version of `crypto-js` replaces `Math.random()` method with native crypto module. Because of this, **SimpleCrypto might not be able to run on some environments without native crypto module support, such as IE 10 (and earlier) or React Native**.

Please [read more here](https://github.com/brix/crypto-js#400).

## List of Contents

* [SimpleCrypto](#simplecrypto)
Expand All @@ -40,9 +34,11 @@ Please [read more here](https://github.com/brix/crypto-js#400).

## What's New?

**What's New in 3.0.0**
**What's New in 2.5.1 (latest legacy)**

* Upgrade `crypto-js` dependency to version `4.0.0`. This version of `crypto-js` replaces `Math.random()` method with native crypto module, and will cause breaking changes in some environments that does not support native crypto module, like IE 10 earlier and React Native. If you are affected by these changes, please use SimpleCrypto `^2.5.0`.
* Improving typings.
* Add eslint and prettier for code cleaning.
* Upgrade devDependencies.

**What's New in 2.5.0**

Expand All @@ -52,16 +48,16 @@ For full change-log, please refer to [CHANGELOG](CHANGELOG.md) file.

## Getting Started

This library is available through [jsDelivr CDN](https://cdn.jsdelivr.net/npm/simple-crypto-js@2.5.0/dist/SimpleCrypto.min.js) and package manager (like [npm](https://www.npmjs.org/) or [yarn](https://www.yarnpkg.com/)).
This library is available through [jsDelivr CDN](https://cdn.jsdelivr.net/npm/simple-crypto-js@legacy/dist/SimpleCrypto.min.js) and package manager (like [npm](https://www.npmjs.org/) or [yarn](https://www.yarnpkg.com/)).

### Vanilla JavaScript + HTML

To get started, add SimpleCrypto script to your HTML page. Only SimpleCrypto prior to version 3.0.0 is supported.
To get started, add SimpleCrypto script to your HTML page. **Only legacy version of SimpleCrypto is supported.**

```html
<head>
<!-- Another line -->
<script src="//cdn.jsdelivr.net/npm/simple-crypto-js@2.5.0/dist/SimpleCrypto.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/simple-crypto-js@legacy/dist/SimpleCrypto.min.js"></script>
<!-- Another line -->
</head>
```
Expand Down
9 changes: 5 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

Only these versions are currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 2.3.0 | :white_check_mark: |
| < 2.3 | :x: |
| Tag | Version | Supported |
| ------ | ------------------------ | ------------------ |
| latest | >= 3.0.0 | :white_check_mark: |
| legacy | >= 2.3.0 && < 3.0.0 | :white_check_mark: |
| | < 2.3 | :x: |

## Reporting a Vulnerability

Expand Down
14 changes: 2 additions & 12 deletions docs/SimpleCrypto.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,7 @@ <h1 class="navbar-item">SimpleCrypto Documentation</h1>
>
API Documentation
</a>
<div class="dropdown is-hoverable is-right">
<a class="dropdown-trigger link">
Tutorials
<i class="fas fa-chevron-down fa-xs"></i>
</a>
<div class="dropdown-menu">
<div class="dropdown-content">

</div>
</div>
</div>



</div>
Expand Down Expand Up @@ -2073,7 +2063,7 @@ <h5>Parameters:</h5>

<footer class="footer">
<div class="content has-text-centered">
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a></p>
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a></p>
<p class="sidebar-created-by">
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
Expand Down
33 changes: 10 additions & 23 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,7 @@ <h1 class="navbar-item">SimpleCrypto Documentation</h1>
>
API Documentation
</a>
<div class="dropdown is-hoverable is-right">
<a class="dropdown-trigger link">
Tutorials
<i class="fas fa-chevron-down fa-xs"></i>
</a>
<div class="dropdown-menu">
<div class="dropdown-content">

</div>
</div>
</div>



</div>
Expand All @@ -91,7 +81,7 @@ <h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes
<div class="core" id="main-content-wrapper">
<div class="content">
<header class="page-title">
<p>Title</p>
<p></p>
<h1>Home</h1>
</header>

Expand Down Expand Up @@ -120,26 +110,23 @@ <h3> </h3>
<section>
<article><h1>SimpleCrypto</h1>
<p><a href="https://github.com/danang-id/simple-crypto-js/releases"><img src="https://img.shields.io/github/release/danang-id/simple-crypto-js.svg" alt="GitHub Release"></a>
<a href="https://travis-ci.org/danang-id/simple-crypto-js"><img src="https://travis-ci.org/danang-id/simple-crypto-js.svg?branch=master" alt="Build Status"></a>
<a href="https://github.com/danang-id/simple-crypto-js/actions/workflows/build-distribution.yml"><img src="https://github.com/danang-id/simple-crypto-js/actions/workflows/build-distribution.yml/badge.svg" alt="Build Distribution"></a>
<a href="https://coveralls.io/github/danang-id/simple-crypto-js?branch=master"><img src="https://coveralls.io/repos/github/danang-id/simple-crypto-js/badge.svg?branch=master" alt="Coverage Status"></a>
<a href="https://www.npmjs.com/package/simple-crypto-js?activeTab=dependencies"><img src="https://img.shields.io/librariesio/release/npm/simple-crypto-js" alt="Dependencies Status"></a></p>
<p><a href="https://www.npmjs.com/package/simple-crypto-js?activeTab=versions"><img src="https://img.shields.io/npm/v/simple-crypto-js.svg" alt="NPM Version"></a>
<a href="https://www.npmjs.com/package/simple-crypto-js/v/legacy?activeTab=dependencies"><img src="https://img.shields.io/librariesio/release/npm/simple-crypto-js/legacy.svg" alt="Dependencies Status"></a></p>
<p><a href="https://www.npmjs.com/package/simple-crypto-js/v/legacy"><img src="https://img.shields.io/npm/v/simple-crypto-js/legacy.svg" alt="NPM Version"></a>
<a href="#license"><img src="https://img.shields.io/npm/l/simple-crypto-js.svg" alt="License"></a>
<a href="https://www.npmjs.com/package/simple-crypto-js"><img src="https://img.shields.io/npm/dm/simple-crypto-js.svg" alt="Monthly Downloads"></a></p>
<a href="https://www.npmjs.com/package/simple-crypto-js/v/legacy"><img src="https://img.shields.io/npm/dm/simple-crypto-js/legacy.svg" alt="Monthly Downloads"></a></p>
<p><strong><em>SimpleCrypto</em></strong> is a JavaScript library that simplify the process of encryption and decryption of JavaScript objects, as simple as just calling <code>encrypt()</code> and <code>decrypt()</code> function. This library implements brix's <a href="https://github.com/brix/crypto-js">crypto-js</a> library. This library is pure JavaScript library built with TypeScript targeting CommonJS ECMAScript 5 (ES5), so it is compatible with most NodeJS back-end applications or JavaScript front-end (client browser).</p>
<h2>Breaking Changes</h2>
<p><strong>v2.3.0: New Algorithm</strong></p>
<p>SimpleCrypto v2.3.0 onward will use a new algorithm, because the older one was vulnerable to chosen cipher attack. Any <strong>data that encrypted using v2.2.0 and earlier will NOT be able to be decrypted using v2.3.0 onward</strong>; vice versa: data encrypted using v2.3.0 onward will NOT be able to be decrypted using v2.2.0 and earlier.</p>
<p><strong>v3.0.0: New Native Crypto Module</strong></p>
<p>SimpleCrypto v3.0.0 onward will use new <code>crypto-js</code> dependency version <code>^4.0.0</code>. This version of <code>crypto-js</code> replaces <code>Math.random()</code> method with native crypto module. Because of this, <strong>SimpleCrypto might not be able to run on some environments without native crypto module support, such as IE 10 (and earlier) or React Native</strong>.</p>
<p>Please <a href="https://github.com/brix/crypto-js#400">read more here</a>.</p>
<h2>Getting Started</h2>
<p>This library is available through <a href="https://cdn.jsdelivr.net/npm/simple-crypto-js@2.5.0/dist/SimpleCrypto.min.js">jsDelivr CDN</a> and package manager (like <a href="https://www.npmjs.org/">npm</a> or <a href="https://www.yarnpkg.com/">yarn</a>).</p>
<p>This library is available through <a href="https://cdn.jsdelivr.net/npm/simple-crypto-js@legacy/dist/SimpleCrypto.min.js">jsDelivr CDN</a> and package manager (like <a href="https://www.npmjs.org/">npm</a> or <a href="https://www.yarnpkg.com/">yarn</a>).</p>
<h3>Vanilla JavaScript + HTML</h3>
<p>To get started, add SimpleCrypto script to your HTML page. Only SimpleCrypto prior to version 3.0.0 is supported.</p>
<p>To get started, add SimpleCrypto script to your HTML page. <strong>Only legacy version of SimpleCrypto is supported.</strong></p>
<pre class="prettyprint source lang-html"><code>&lt;head>
&lt;!-- Another line -->
&lt;script src=&quot;//cdn.jsdelivr.net/npm/simple-crypto-js@2.5.0/dist/SimpleCrypto.min.js&quot;>&lt;/script>
&lt;script src=&quot;//cdn.jsdelivr.net/npm/simple-crypto-js@legacy/dist/SimpleCrypto.min.js&quot;>&lt;/script>
&lt;!-- Another line -->
&lt;/head>
</code></pre>
Expand Down Expand Up @@ -307,7 +294,7 @@ <h3>Random Generator</h3>

<footer class="footer">
<div class="content has-text-centered">
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a></p>
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a></p>
<p class="sidebar-created-by">
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/styles/app.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 56de7eb

Please sign in to comment.