-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update golos-lib-js to 0.9.71, support check-integrity
- Loading branch information
1 parent
0135dae
commit 664126f
Showing
5 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
const fs = require('fs') | ||
const { hashElement } = require('folder-hash') | ||
|
||
async function main(argv) { | ||
try { | ||
const hashOut = './lib/my_hash.js' | ||
|
||
const path = 'node_modules/golos-lib-js' | ||
|
||
const res = await hashElement(path, { | ||
files: { | ||
exclude: [ | ||
path + '/lib/my_hash.js', | ||
path + '/dist/golos.min.js.gz', | ||
path + '/dist/golos-tests.min.js.gz', | ||
path + '/dist/stats.html', | ||
// These not including when NPM publishes | ||
'.npmrc', | ||
'.babelrc', | ||
'.gitignore', | ||
'.npmignore', | ||
'yarn.lock', | ||
], | ||
matchBasename: true, | ||
matchPath: true, | ||
}, | ||
folders: { | ||
exclude: [ | ||
'node_modules', | ||
path + '/src', | ||
path + '/examples' | ||
], | ||
matchPath: true, | ||
ignoreRootName: true | ||
} | ||
}) | ||
|
||
console.log(res.children) | ||
//console.log(res.children.filter(o => o.name === 'lib')[0].children.filter(o => o.name === 'auth')[0].children) | ||
|
||
console.log('LIBRARY HASH IS', res.hash) | ||
|
||
if (argv[2] === '--save') { | ||
let json = 'node_modules/golos-lib-js/package.json' | ||
json = fs.readFileSync(json, 'utf8') | ||
json = JSON.parse(json) | ||
|
||
const appPath = 'app/JsLibHash.json' | ||
let data = {} | ||
data.version = json.version | ||
data.hash = res.hash | ||
fs.writeFileSync(appPath, JSON.stringify(data)) | ||
} | ||
} catch (err) { | ||
console.error('LIBRARY HASH FAILED:', err) | ||
} | ||
} | ||
|
||
main(process.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,18 +9,19 @@ | |
"main": "dist/electron/electron.js", | ||
"scripts": { | ||
"build-version": "./server/build-version.sh", | ||
"build": "NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack/prod.config.js", | ||
"build-hash": "node check_integrity --save", | ||
"build": "npm run build-hash && NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack/prod.config.js", | ||
"mocha": "NODE_ENV=test mocha ./mocha.setup.js", | ||
"test": "npm run mocha -- app/**/*.test.js", | ||
"test:watch:all": "npm test -- --watch --watch-extensions jsx", | ||
"test:watch": "npm run mocha -- --watch --watch-extensions jsx", | ||
"prod": "NODE_ENV=production ./node_modules/@babel/node/bin/babel-node.js server/index.js", | ||
"dev": "./node_modules/.bin/webpack serve --config ./webpack/dev.config.js", | ||
"dev": "npm run build-hash && ./node_modules/.bin/webpack serve --config ./webpack/dev.config.js", | ||
"dev:local": "./.env.start.local.sh", | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook", | ||
"dev:app": "./node_modules/.bin/webpack serve --config ./webpack/dev-app.config.js", | ||
"build:app": "cross-env NODE_ENV=production NODE_CONFIG_ENV=production,desktop ./node_modules/.bin/webpack --config ./webpack/prod-app.config.js", | ||
"build:app": "npm run build-hash && cross-env NODE_ENV=production NODE_CONFIG_ENV=production,desktop ./node_modules/.bin/webpack --config ./webpack/prod-app.config.js", | ||
"build:app-entry": "cross-env NODE_ENV=production NODE_CONFIG_ENV=production,desktop ./node_modules/@babel/node/bin/babel-node.js build_app_entry.js" | ||
}, | ||
"author": "Golos <[email protected]>", | ||
|
@@ -52,7 +53,7 @@ | |
"fs-extra": "^10.0.1", | ||
"git-rev-sync": "^3.0.2", | ||
"golos-dex-lib-js": "^1.0.2", | ||
"golos-lib-js": "^0.9.68", | ||
"golos-lib-js": "^0.9.71", | ||
"history": "^2.0.0-rc2", | ||
"immutable": "^3.8.2", | ||
"intl": "^1.2.5", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters