Skip to content

Commit

Permalink
Update deps (#137)
Browse files Browse the repository at this point in the history
* update deps

* new prettier settings

* eslint

* update submodules
  • Loading branch information
s0l0ist authored Oct 7, 2022
1 parent c7418ad commit ef17fff
Show file tree
Hide file tree
Showing 45 changed files with 8,852 additions and 9,642 deletions.
22 changes: 15 additions & 7 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ module.exports = {
// globalTeardown: null,

// A set of global variables that need to be available in all test environments
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json'
}
},
// DEPRECATED
// globals: {
// 'ts-jest': {
// tsconfig: 'tsconfig.test.json'
// }
// },

// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
Expand Down Expand Up @@ -159,7 +160,7 @@ module.exports = {
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/', '/submodules/']
testPathIgnorePatterns: ['/node_modules/', '/submodules/'],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
Expand All @@ -177,7 +178,14 @@ module.exports = {
// timers: "real",

// A map from regular expressions to paths to transformers
// transform: null,
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json'
}
]
}

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand Down
6,808 changes: 2,977 additions & 3,831 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-seal",
"version": "5.0.0",
"version": "5.0.1",
"description": "Homomorphic Encryption for TypeScript or JavaScript using Microsoft SEAL",
"repository": {
"type": "git",
Expand Down Expand Up @@ -67,33 +67,33 @@
"publish": "npm publish --access=public ./dist/node-seal-*.tgz"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@babel/preset-env": "^7.16.11",
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.19.3",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-typescript": "^8.3.1",
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"@rollup/plugin-typescript": "^8.5.0",
"@types/jest": "^29.1.2",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"better-docs": "^2.7.2",
"codecov": "^3.8.3",
"env-cmd": "^10.1.0",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-jsdoc": "^37.9.6",
"eslint-plugin-prettier": "^4.0.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.1",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-prettier": "^4.2.1",
"esm": "^3.2.25",
"jest": "^27.5.1",
"jsdoc": "^3.6.10",
"jest": "^29.1.2",
"jsdoc": "^3.6.11",
"path": "^0.12.7",
"prettier": "^2.5.1",
"rollup": "^2.69.0",
"prettier": "^2.7.1",
"rollup": "^2.79.1",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.31.2",
"ts-jest": "^27.1.3",
"typescript": "^4.6.2"
"rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4"
}
}
4 changes: 2 additions & 2 deletions src/__tests__/batch-encoder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ describe('BatchEncoder', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.BatchEncoder)
Constructor(context)
expect(Constructor).toBeCalledWith(context)
expect(Constructor).toHaveBeenCalledWith(context)
})
test('It should fail to construct an instance', () => {
const Constructor = jest.fn(seal.BatchEncoder)
expect(() => Constructor(null as unknown as Context)).toThrow()
expect(Constructor).toBeCalledWith(null)
expect(Constructor).toHaveBeenCalledWith(null)
})
test('It should have properties', () => {
const item = seal.BatchEncoder(context)
Expand Down
12 changes: 6 additions & 6 deletions src/__tests__/cipher-text.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,18 @@ describe('CipherText', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.CipherText)
Constructor()
expect(Constructor).toBeCalledWith()
expect(Constructor).toHaveBeenCalledWith()
})
test('It should construct an instance with a bfvContext', () => {
const Constructor = jest.fn(seal.CipherText)
Constructor({ context: bfvContext })
expect(Constructor).toBeCalledWith({ context: bfvContext })
expect(Constructor).toHaveBeenCalledWith({ context: bfvContext })
})
test('It should construct an instance with a bfvContext, parmsId', () => {
const Constructor = jest.fn(seal.CipherText)
const parmsId = bfvContext.firstParmsId
Constructor({ context: bfvContext, parmsId })
expect(Constructor).toBeCalledWith({
expect(Constructor).toHaveBeenCalledWith({
context: bfvContext,
parmsId
})
Expand All @@ -86,7 +86,7 @@ describe('CipherText', () => {
const Constructor = jest.fn(seal.CipherText)
const parmsId = bfvContext.firstParmsId
Constructor({ context: bfvContext, parmsId, sizeCapacity: 2 })
expect(Constructor).toBeCalledWith({
expect(Constructor).toHaveBeenCalledWith({
context: bfvContext,
parmsId,
sizeCapacity: 2
Expand All @@ -97,7 +97,7 @@ describe('CipherText', () => {
expect(() =>
Constructor({ context: bfvContext, sizeCapacity: 2 })
).toThrow()
expect(Constructor).toBeCalledWith({
expect(Constructor).toHaveBeenCalledWith({
context: bfvContext,
sizeCapacity: 2
})
Expand All @@ -108,7 +108,7 @@ describe('CipherText', () => {
expect(() =>
Constructor({ context: bfvContext, parmsId, sizeCapacity: -2 })
).toThrow()
expect(Constructor).toBeCalledWith({
expect(Constructor).toHaveBeenCalledWith({
context: bfvContext,
parmsId,
sizeCapacity: -2
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/ckks-encoder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('CKKSEncoder', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.CKKSEncoder)
Constructor(ckksContext)
expect(Constructor).toBeCalledWith(ckksContext)
expect(Constructor).toHaveBeenCalledWith(ckksContext)
})
test('It should have properties', () => {
const item = seal.CKKSEncoder(ckksContext)
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Context', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.Context)
Constructor(bfvEncParms)
expect(Constructor).toBeCalledWith(bfvEncParms)
expect(Constructor).toHaveBeenCalledWith(bfvEncParms)
})
test('It should have properties', () => {
const item = seal.Context(bfvEncParms)
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/decryptor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Decryptor', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.Decryptor)
Constructor(bfvContext, bfvSecretKey)
expect(Constructor).toBeCalledWith(bfvContext, bfvSecretKey)
expect(Constructor).toHaveBeenCalledWith(bfvContext, bfvSecretKey)
})
test('It should fail to construct an instance', () => {
const newParms = seal.EncryptionParameters(seal.SchemeType.bfv)
Expand All @@ -76,7 +76,7 @@ describe('Decryptor', () => {

const Constructor = jest.fn(seal.Decryptor)
expect(() => Constructor(bfvContext, newSecretKey)).toThrow()
expect(Constructor).toBeCalledWith(bfvContext, newSecretKey)
expect(Constructor).toHaveBeenCalledWith(bfvContext, newSecretKey)
})
test('It should have properties', () => {
const item = seal.Decryptor(bfvContext, bfvSecretKey)
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/encryption-parameters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('EncryptionParameters', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.EncryptionParameters)
Constructor()
expect(Constructor).toBeCalledWith()
expect(Constructor).toHaveBeenCalledWith()
})
test('It should have properties', () => {
const encParms = seal.EncryptionParameters()
Expand Down
10 changes: 7 additions & 3 deletions src/__tests__/encryptor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ describe('Encryptor', () => {
test('It should construct an instance', () => {
const Constructor = jest.fn(seal.Encryptor)
Constructor(bfvContext, bfvPublicKey)
expect(Constructor).toBeCalledWith(bfvContext, bfvPublicKey)
expect(Constructor).toHaveBeenCalledWith(bfvContext, bfvPublicKey)
})
test('It should construct an instance with a bfvSecretKey', () => {
const Constructor = jest.fn(seal.Encryptor)
Constructor(bfvContext, bfvPublicKey, bfvSecretKey)
expect(Constructor).toBeCalledWith(bfvContext, bfvPublicKey, bfvSecretKey)
expect(Constructor).toHaveBeenCalledWith(
bfvContext,
bfvPublicKey,
bfvSecretKey
)
})
test('It should fail to construct an instance', () => {
const newParms = seal.EncryptionParameters(seal.SchemeType.bfv)
Expand All @@ -82,7 +86,7 @@ describe('Encryptor', () => {

const Constructor = jest.fn(seal.Encryptor)
expect(() => Constructor(bfvContext, newPublicKey)).toThrow()
expect(Constructor).toBeCalledWith(bfvContext, newPublicKey)
expect(Constructor).toHaveBeenCalledWith(bfvContext, newPublicKey)
})
test('It should have properties', () => {
const item = seal.Encryptor(bfvContext, bfvPublicKey)
Expand Down
Loading

0 comments on commit ef17fff

Please sign in to comment.