fixes npm security issues

This commit is contained in:
koehr 2019-06-11 17:14:43 +02:00
parent 59ac454bc5
commit 6abd225eb5
5 changed files with 1333 additions and 2924 deletions

4223
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -10,8 +10,8 @@
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules" "build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
}, },
"dependencies": { "dependencies": {
"seedrandom": "^2.4.3", "seedrandom": "^2.4.4",
"vue": "^2.5.11" "vue": "^2.6.10"
}, },
"browserslist": [ "browserslist": [
"> 1%", "> 1%",
@ -19,18 +19,18 @@
"not ie <= 10" "not ie <= 10"
], ],
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.0", "babel-core": "^6.26.3",
"babel-loader": "^7.1.2", "babel-loader": "^7.1.5",
"babel-preset-env": "^1.6.0", "babel-preset-env": "^1.7.0",
"babel-preset-stage-3": "^6.24.1", "babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.0.5", "cross-env": "^5.2.0",
"css-loader": "^0.28.7", "css-loader": "^3.0.0",
"fast-simplex-noise": "^3.2.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
"lodash": "^4.17.10", "lodash": "^4.17.11",
"vue-loader": "^13.0.5", "open-simplex-noise": "^1.6.0",
"vue-template-compiler": "^2.4.4", "vue-loader": "^13.7.3",
"webpack": "^3.6.0", "vue-template-compiler": "^2.6.10",
"webpack-dev-server": "^2.9.1" "webpack": "^3.12.0",
"webpack-dev-server": "^2.11.5"
} }
} }

View file

@ -2,7 +2,7 @@ import {type as T, level as L, probability as P} from './def'
export default class BlockGen { export default class BlockGen {
constructor (noiseGen) { constructor (noiseGen) {
this.rand = (x, y) => 0.5 + 0.5 * noiseGen.raw2D(x, y) this.rand = (x, y) => 0.5 + 0.5 * noiseGen.noise2D(x, y)
} }
level (level, column, row, previousRow) { level (level, column, row, previousRow) {

View file

@ -1,5 +1,5 @@
import SeedRng from 'seedrandom' import SeedRng from 'seedrandom'
import FastSimplexNoise from 'fast-simplex-noise' import SimplexNoise from 'open-simplex-noise'
import {type as T, level as L} from './def' import {type as T, level as L} from './def'
import BlockGen from './first-iteration' import BlockGen from './first-iteration'
@ -9,7 +9,7 @@ import PlayerChanges from './third-iteration'
export default class Level { export default class Level {
constructor (width, height, seed = 'super random seed') { constructor (width, height, seed = 'super random seed') {
const random = SeedRng(seed) const random = SeedRng(seed)
const noiseGen = new FastSimplexNoise({ random }) const noiseGen = new SimplexNoise(parseInt(seed, 32))
this._w = width this._w = width
this._h = height this._h = height
this._grid = new Array(this._h) this._grid = new Array(this._h)

View file

@ -2,7 +2,7 @@ import {type as T, level as L, probability as P} from './def'
export default class BlockExt { export default class BlockExt {
constructor (noiseGen) { constructor (noiseGen) {
this.rand = (x, y) => 0.5 + 0.5 * noiseGen.raw2D(x, y) this.rand = (x, y) => 0.5 + 0.5 * noiseGen.noise2D(x, y)
} }
level (level, column, row, previousRow) { level (level, column, row, previousRow) {