php-serialize
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -0,1 +1,5 @@ | ||
### 4.0.1 | ||
- Emit declarations for typings, instead of using source | ||
### 4.0.0 | ||
@@ -2,0 +6,0 @@ |
@@ -26,2 +26,3 @@ "use strict"; | ||
if (classReference) { | ||
// @ts-ignore | ||
container = new (helpers_1.getClass(classReference.prototype))(); | ||
@@ -28,0 +29,0 @@ } |
@@ -21,2 +21,3 @@ var __assign = (this && this.__assign) || function () { | ||
if (classReference) { | ||
// @ts-ignore | ||
container = new (getClass(classReference.prototype))(); | ||
@@ -23,0 +24,0 @@ } |
{ | ||
"name": "php-serialize", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "PHP serialize/unserialize in Javascript", | ||
"main": "lib/cjs/index.js", | ||
"typings": "src/index.ts", | ||
"typings": "lib/typings/index.d.ts", | ||
"module": "lib/esm/index.js", | ||
@@ -12,6 +12,7 @@ "scripts": { | ||
"lint": "(tsc -p . --noEmit) && (eslint . --ext .ts) && (prettier --list-different src/*.ts)", | ||
"prepare": "yarn build:clean ; yarn build:esm ; yarn build:cjs ", | ||
"prepare": "yarn build:clean ; yarn build:esm ; yarn build:cjs ; yarn build:typings", | ||
"build:clean": "rm -rf lib", | ||
"build:esm": "tsc --module es2015 --target es5 --outDir lib/esm", | ||
"build:cjs": "tsc --module commonjs --target es5 --outDir lib/cjs" | ||
"build:cjs": "tsc --module commonjs --target es5 --outDir lib/cjs", | ||
"build:typings": "tsc --declaration --outDir lib/typings --emitDeclarationOnly" | ||
}, | ||
@@ -18,0 +19,0 @@ "repository": { |
@@ -16,2 +16,3 @@ import invariant from 'assert' | ||
if (classReference) { | ||
// @ts-ignore | ||
container = new (getClass(classReference.prototype))() | ||
@@ -57,6 +58,6 @@ } else { | ||
if (type === 'string') { | ||
return parser.getByLength('"', '"', length => parser.readAhead(length)) | ||
return parser.getByLength('"', '"', (length) => parser.readAhead(length)) | ||
} | ||
if (type === 'array-object') { | ||
const pairs = parser.getByLength('{', '}', length => unserializePairs(parser, length, scope, options)) | ||
const pairs = parser.getByLength('{', '}', (length) => unserializePairs(parser, length, scope, options)) | ||
@@ -71,5 +72,5 @@ const isArray = pairs.every((item, idx) => isInteger(item.key) && idx === item.key) | ||
if (type === 'notserializable-class') { | ||
const name = parser.getByLength('"', '"', length => parser.readAhead(length)) | ||
const name = parser.getByLength('"', '"', (length) => parser.readAhead(length)) | ||
parser.seekExpected(':') | ||
const pairs = parser.getByLength('{', '}', length => unserializePairs(parser, length, scope, options)) | ||
const pairs = parser.getByLength('{', '}', (length) => unserializePairs(parser, length, scope, options)) | ||
const result = getClassReference(name, scope, options.strict) | ||
@@ -93,5 +94,5 @@ | ||
if (type === 'serializable-class') { | ||
const name = parser.getByLength('"', '"', length => parser.readAhead(length)) | ||
const name = parser.getByLength('"', '"', (length) => parser.readAhead(length)) | ||
parser.seekExpected(':') | ||
const payload = parser.getByLength('{', '}', length => parser.readAhead(length)) | ||
const payload = parser.getByLength('{', '}', (length) => parser.readAhead(length)) | ||
const result = getClassReference(name, scope, options.strict) | ||
@@ -98,0 +99,0 @@ if (!(result instanceof __PHP_Incomplete_Class)) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
46511
28
1146
0