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

remove electron.remote dependency #1113

Merged
merged 1 commit into from
Apr 15, 2023

Conversation

Araxeus
Copy link
Collaborator

@Araxeus Araxeus commented Apr 15, 2023

now in renderer check if we are in dev mode using 'npm_package_name' in process.env

The logic is that we always run the dev mode via npm/yarn and thus that env var will be available

fix #966

const isDev = () => {
	if ('ELECTRON_IS_DEV' in process.env) {
		return Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1;
	}

	if (process.type === 'browser') {
		return !electron.app.isPackaged;
	}

	return 'npm_package_name' in process.env;
};

now in renderer check if we are in dev mode using `'npm_package_name' in process.env`

The logic is that we always run the dev mode via npm/yarn and thus that env var will be available
@Araxeus
Copy link
Collaborator Author

Araxeus commented Apr 15, 2023

This is so dumb... I can't see what snyk is saying

image

@th-ch can you enable requesting access on snyk? https://docs.snyk.io/snyk-admin/manage-users-and-permissions/organization-access-requests#settings

and why does it fail?

@th-ch
Copy link
Owner

th-ch commented Apr 15, 2023

Snyk fails with Failed to process package.json and yarn.lock which does not seem related to the change ✅

@th-ch th-ch merged commit 7e60049 into th-ch:master Apr 15, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of remnants of electron.remote
2 participants