Skip to content

update management permission regex - #26

Open
Toumash wants to merge 1 commit into
StarkShang:mainfrom
Toumash:bugfix/management-api-exclude-from-needing-permissions
Open

update management permission regex#26
Toumash wants to merge 1 commit into
StarkShang:mainfrom
Toumash:bugfix/management-api-exclude-from-needing-permissions

Conversation

@Toumash

@Toumash Toumash commented Dec 2, 2021

Copy link
Copy Markdown

Issue with details can be found here: #22

New regex for checking if code is using the management module

There is something more missing, because adding this code to examples\background\dist\background.js

chrome.management.getSelf(() => {
// my code
})

and running the build

yarn; yarn build;
cd examples/background
yarn;yarn build;

still adds management into examples\background\dist\manifest.json

I'm still unsure how exactly code in file src\manifest-input\manifest-parser\permissions.ts is being used

@Toumash
Toumash force-pushed the bugfix/management-api-exclude-from-needing-permissions branch from ffad6c8 to 8022a05 Compare December 2, 2021 20:46
@Toumash

Toumash commented Dec 2, 2021

Copy link
Copy Markdown
Author

Writing the test in the src\manifest-input\__tests__\manifest__hook--generateBundle.test.ts should be easier that this testing, but i cannot get it to run

yarn test
yarn run v1.22.17
$ cross-env TS_NODE_COMPILER_OPTIONS={\"module\":\"commonjs\"} mocha --file tests/unit/setup.ts --require ts-node/register --require tsconfig-paths/register

TSError:  Unable to compile TypeScript:
src/utils/helpers.ts:84:25 - error TS2571: Object is of type 'unknown'.

84             handleError(error.message);

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.

1 participant