Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update some dependencies - fixes some vulnerabilities #231

Merged
merged 31 commits into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
33c6b19
Fix mas build
wojtkowiak Dec 21, 2018
3c8bfc3
Allow config header Access-Control-Allow-Origin on LocalServer module
Dec 26, 2018
a597ebd
Change configuration name
Dec 26, 2018
e12ae0c
Fix linting errors
Dec 26, 2018
37e7fe0
electron-5: Added support for Electron 5
KoenLav Mar 4, 2019
bd1eeb8
electron-5: Fix tests?
KoenLav May 13, 2019
2fd7543
Update some dependencies - fix some vulnerabilities
darqs Jul 17, 2019
4b26f11
Merge pull request #232 from KoenLav/electron-5
darqs Jul 17, 2019
df86954
Merge pull request #233 from cbh6/master
darqs Jul 17, 2019
10dd834
Ignore Browserslist errors & update CHANGELOG
darqs Jul 17, 2019
0135494
Update some dev dependencies
darqs Jul 17, 2019
ac543ac
Merge pull request #234 from wojtkowiak/v2.0.1
darqs Jul 17, 2019
f2897cb
Update default Electron version
darqs Jul 20, 2019
875be6d
Update lodash & typo fix
darqs Jul 28, 2019
bf365bd
electron-5: Updated Node.js and test suite
KoenLav Aug 8, 2019
0642414
electron-5: Updated version number
KoenLav Aug 8, 2019
3f0ac8d
electron-5: Merged updates
KoenLav Aug 8, 2019
af2eca9
electron-5: Updated defaultDependencies
KoenLav Aug 8, 2019
9b8ee74
electron-5: Fix tests?
KoenLav Aug 8, 2019
5cf5e30
electron-5: Fix tests some more
KoenLav Aug 8, 2019
fffff09
electron-5: Tests
KoenLav Aug 8, 2019
c86b0a8
electron-5: Fixed electronApp
KoenLav Aug 8, 2019
859dccb
electron-5: Fixed some more
KoenLav Aug 8, 2019
8160f45
electron-5: Updated
KoenLav Aug 8, 2019
934941c
electron-5: Updated dependencies
KoenLav Aug 8, 2019
a59f1dd
electron-5: Updated versions
KoenLav Aug 8, 2019
a1f4d9a
electron-5: Downgraded mocha
KoenLav Aug 8, 2019
b84fa88
electron-5: DOwngraded version
KoenLav Aug 8, 2019
9d670d4
Add some test for 'allowOriginLocalServer'
darqs Aug 11, 2019
6956121
Package name
darqs Aug 11, 2019
2e390a1
Added support for private npm repository
darqs Aug 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"presets": [
["@babel/env", {
"targets": {
"node": "4"
"node": "12"
}
}]
],
Expand Down
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
test:
docker:
- image: circleci/node:8.11.3-jessie-browsers
- image: circleci/node:10.16.0-jessie-browsers
steps:
- checkout
- run:
Expand All @@ -24,7 +24,7 @@ jobs:
command: npm run test
test-integration:
docker:
- image: circleci/node:8.11.3-jessie-browsers
- image: circleci/node:10.16.0-jessie-browsers
steps:
- checkout
- run:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
name: install Meteor
command: |
# only install meteor if bin isn't found
command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com/?release=1.5.4.1 | /bin/sh
command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com/?release=1.8.1 | /bin/sh
- run:
name: copy meteor bin to build cache
command: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ coverage
*.lcov
version
port.cfg

.reify-cache
tests/.__tmp/autoupdate/Downloading
tests/.__tmp/autoupdate/autoupdate.json
tests/.__tmp/meteorProject
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ os:

env:
- TEST=normal NODE_VERSION=8
- TEST=normal NODE_VERSION=9
- TEST=normal NODE_VERSION=10
- TEST=integration NODE_VERSION=8
- TEST=integration NODE_VERSION=9
- TEST=integration NODE_VERSION=10

before_install:
- nvm install $NODE_VERSION
Expand All @@ -26,7 +26,7 @@ before_install:
then
meteor --version;
else
curl https://install.meteor.com/?release=1.5.4.1 | /bin/sh;
curl https://install.meteor.com/?release=1.8.1 | /bin/sh;
fi;
fi

Expand Down
97 changes: 53 additions & 44 deletions CHANGELOG.md

Large diffs are not rendered by default.

246 changes: 123 additions & 123 deletions README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ skip_tags: true

environment:
matrix:
- nodejs_version: "8"
- nodejs_version: "10"
test: "normal"
platform: x64
- nodejs_version: "8"
- nodejs_version: "10"
test: "integration"
platform: x64
- nodejs_version: "9"
- nodejs_version: "10"
test: "integration"
platform: x64
- nodejs_version: "9"
- nodejs_version: "10"
test: "normal"
platform: x64

Expand All @@ -36,7 +36,7 @@ install:
- ps: >-
if ($env:test -eq "integration") {
if ((Get-Command "meteor" -ErrorAction SilentlyContinue) -eq $null) {
choco install meteor --params "'/RELEASE:1.5.4.1'"
choco install meteor --params "'/RELEASE:1.8.1'"
}
}
- ps: refreshenv
Expand Down
2 changes: 1 addition & 1 deletion devEnvSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ question('Do you want to use another path (yes/no)? ')
});
}
console.log('\nCreating meteor-desktop-test-app');
exec('meteor create meteor-desktop-test-app --release=METEOR@1.4.2.7');
exec('meteor create meteor-desktop-test-app --release=METEOR@1.6');

console.log('Installing deps in meteor-desktop...\n');
return spawn(npm, ['install'], path.join(resolvedPath, 'meteor-desktop'));
Expand Down
7 changes: 3 additions & 4 deletions lib/defaultDependencies.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
electron: '2.0.10',
'electron-builder': '20.28.4',
'electron-packager': '12.1.2'
electron: '6.0.1',
'electron-builder': '21.2.0',
'electron-packager': '14.0.4'
};

12 changes: 11 additions & 1 deletion lib/electronApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,16 @@ export default class ElectronApp {
process.exit(1);
}

try {
const fileName = '.npmrc';
const dirName = '.meteor/desktop-build';
if (fs.existsSync(dirName) && fs.existsSync(fileName)) {
fs.copyFileSync(fileName, `${dirName}/${fileName}`);
}
} catch (e) {
this.log.warn('error while copying .npmrc', e);
}

try {
await this.exposeElectronModules();
} catch (e) {
Expand Down Expand Up @@ -842,7 +852,7 @@ export default class ElectronApp {

const uglifyingEnabled = 'uglify' in settings && !!settings.uglify;

const preset = presetEnv(undefined, { targets: { node: '8' } });
const preset = presetEnv({ assertVersion: () => { } }, { targets: { node: '12' } });

const { data: files } = await this.$.utils.readDir(this.$.env.paths.desktopTmp.root);

Expand Down
15 changes: 14 additions & 1 deletion lib/electronBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class InstallerBuilder {
this.lastRebuild = {};
this.currentContext = null;
this.installerDir = path.join(this.$.env.options.output, this.$.env.paths.installerDir);
this.platforms = [];
}

async init() {
Expand All @@ -66,7 +67,8 @@ export default class InstallerBuilder {
* @returns {Object}
*/
prepareLastRebuildObject(arch, platform = process.platform) {
const productionDeps = this.packageDependencies.createLazyProductionDeps(this.$.env.paths.electronApp.root);
const productionDeps = this.packageDependencies
.createLazyProductionDeps(this.$.env.paths.electronApp.root);
this.lastRebuild = {
frameworkInfo: { version: this.$.getElectronVersion(), useCustomDist: true },
platform,
Expand Down Expand Up @@ -142,6 +144,11 @@ export default class InstallerBuilder {
* @returns {Promise}
*/
afterPack(context) {
this.platforms = this.platforms
.filter(platform => platform !== context.electronPlatformName);
if (this.platforms.length !== 0) {
return Promise.resolve();
}
return new Promise((resolve, reject) => {
shell.config.fatal = true;

Expand Down Expand Up @@ -329,6 +336,12 @@ export default class InstallerBuilder {
output: path.join(this.$.env.options.output, this.$.env.paths.installerDir)
};

if ('mac' in builderOptions && 'target' in builderOptions.mac) {
if (builderOptions.mac.target.includes('mas')) {
this.platforms = ['darwin', 'mas'];
}
}

try {
this.log.debug('calling build from electron-builder');
await this.builder.dependency.build(Object.assign({
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class MeteorDesktop {
const { dependencies = {}, devDependencies = {} } = JSON.parse(
fs.readFileSync(path.join(this.env.paths.meteorApp.root, 'package.json'), 'UTF-8')
);
if (!( name in dependencies ) && !( name in devDependencies )) {
if (!(name in dependencies) && !(name in devDependencies)) {
await this.meteorApp.runNpm(['i', '-D', '-E', '--only=dev', `${name}@${version}`], 'inherit');
}
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions lib/skeletonDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default {
'find-port': '2.0.1',
rimraf: '2.6.2',
shelljs: '0.7.5',
lodash: '4.17.10',
request: '2.79.0',
lodash: '4.17.15',
request: '2.88.0',
queue: '4.0.1',
reify: '0.17.3',
send: '0.16.2',
Expand Down
Loading