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

Add brave extension history to components/brave_extension/extension/brave_extension #1754

Merged
merged 369 commits into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
369 commits
Select commit Hold shift + click to select a range
4a037a2
Update locale strings on the shield panel
yrliou Mar 28, 2018
90b4993
Update strings from Transifex
yrliou Mar 28, 2018
682e89d
support block_third_party fingerprinting protection
yrliou Mar 28, 2018
f805907
Update fingerprinting test
yrliou Mar 28, 2018
ff25a96
Use https://firstParty/* instead of new content setting type
yrliou Apr 3, 2018
6b9e384
Merge pull request #15 from brave/3rd_party_FP
yrliou Apr 5, 2018
5e7d4e7
Revert "Merge pull request #16 from brave/test-fixes"
bbondy Apr 17, 2018
a10c297
Merge pull request #17 from brave/revert-brave-ui
yrliou Apr 17, 2018
fe7b2a6
Merge pull request #16 from brave/test-fixes
yrliou Apr 5, 2018
e69f3b7
Update brave-ui to v0.7.0
cezaraugusto Apr 20, 2018
510031b
Merge pull request #18 from brave/brave-ui-0.7.0
yrliou Apr 20, 2018
3a28339
Add settings for cookies and referrer blocking
bbondy Apr 6, 2018
26205d7
Update shieldsAPI.ts
bbondy Apr 27, 2018
e98aed2
Merge pull request #19 from brave/cookies
bbondy Apr 28, 2018
cacce35
Update l10n
bbondy May 1, 2018
345f7a2
Update to webpack 4 to fix UglifyJS error
bbondy May 1, 2018
d220de1
Merge pull request #20 from brave/C66.0.3359.117
bbondy May 2, 2018
a9d8aa5
allow brave-extension to run on chrome
May 10, 2018
fa36de9
Merge pull request #22 from Snuupy/chrome
bbondy May 11, 2018
d7422e6
Add locale strings for noScript component
yrliou May 1, 2018
d1afaf3
Update brave-ui dependency to 0.7.1 for NoScript component
yrliou May 1, 2018
b3e04ec
Implement per-origin noscript
yrliou Mar 22, 2018
a34441a
tests for allow script once
yrliou May 2, 2018
b6b389d
update strings from Transifex
yrliou May 4, 2018
93927a7
Update the message of noScriptApplyOnce button label from 'Apply Once…
yrliou May 15, 2018
649df8a
Use bundle_data to add locale resources to brave framework bundle
simonhong May 17, 2018
a9a7c86
Use reducer to handle noscript states and show both allowed and block…
yrliou May 15, 2018
b03ff4b
update unit tests
yrliou May 15, 2018
af3a95d
Merge pull request #23 from simonhong/master
bbondy May 20, 2018
f51a2b7
s/willBlocked/willBlock/g
yrliou May 23, 2018
2751cf4
Merge pull request #21 from brave/per_origin_no_script
yrliou May 23, 2018
bf4da46
Include all resource types in badge text
yrliou May 23, 2018
e837bc9
fix getting FP settings
yrliou May 23, 2018
03b9a7b
Merge pull request #24 from brave/fix_badge_text
yrliou May 24, 2018
fbd3fe4
Merge pull request #25 from brave/fix_fp_setting
yrliou May 24, 2018
df7d42d
fix webpack silently failing; update typescript and awesome-typescrip…
mbacchi May 31, 2018
0e85bff
redux-thunk needs to be compatible with typescript
mbacchi May 31, 2018
6b37b60
Merge pull request #26 from brave/webpack-fix
bbondy Jun 1, 2018
fd0b9a6
Update @types/react-redux to fix TS2344 error during build
Jun 4, 2018
e8b5d46
Merge pull request #28 from brave/fix-TS2344-error
bbondy Jun 5, 2018
e36f246
Change node builder from npm to yarn
bkero Jun 6, 2018
7b9abbc
Merge pull request #30 from bkero/master
mbacchi Jun 6, 2018
7408ae7
Hardcode jsdom 11.0.4 in package.json
bkero Jun 6, 2018
d5ed3b5
Merge pull request #31 from bkero/master
mbacchi Jun 6, 2018
2cb9e13
Revert "Change node builder from npm to yarn"
bbondy Jun 6, 2018
f83f0be
Merge pull request #32 from brave/revert-30-master
bbondy Jun 6, 2018
6bba99b
supress webpack warning regarding dev mode
cezaraugusto Jun 8, 2018
43d3943
Merge pull request #33 from brave/webpack/devmode
bbondy Jun 9, 2018
786b013
update brave-ui to v0.10.5
cezaraugusto Jun 12, 2018
48270de
add support for Enzyme + add more tests to BraveShieldsHeader
cezaraugusto Jun 12, 2018
3d98353
test BraveShieldsFooter with Enzyme
cezaraugusto Jun 12, 2018
d0de3a9
add tests for BravShieldsControls
cezaraugusto Jun 12, 2018
6f2b4b0
test BraveShieldsStats with Enzyme
cezaraugusto Jun 12, 2018
d8184d1
add basic support for NoScript unit tests
cezaraugusto Jun 12, 2018
f74d944
bump brave-ui to v0.10.6
cezaraugusto Jun 13, 2018
244c14a
Merge pull request #34 from brave/brave-ui/v0.10.5
cezaraugusto Jun 13, 2018
a518b24
add support to show blocked resources by clicking on stats
cezaraugusto Jun 14, 2018
19c3e81
Merge pull request #35 from brave/shields/stats/click-to-show
bbondy Jun 15, 2018
9322155
click should toggle on/off stat resources display
cezaraugusto Jun 19, 2018
c912851
disallow text selection in shields
cezaraugusto Jun 19, 2018
38b2455
Merge pull request #36 from brave/shields/stats/click-to-show-2
cezaraugusto Jun 19, 2018
b1bbd81
show browserAction as disabled when shield is off
cezaraugusto Jun 25, 2018
e10e5b0
add tests for browserAction.setIcon
cezaraugusto Jun 25, 2018
eb9b817
Merge pull request #37 from brave/shields/disabled-browser-action
cezaraugusto Jun 26, 2018
c8e432d
stick with @types/react on 16.4.2
cezaraugusto Jun 28, 2018
570addc
add package-lock.json
cezaraugusto Jun 28, 2018
a9dec6f
Merge pull request #38 from brave/types/react
mbacchi Jun 28, 2018
1b357ef
update yarn.lock file
cezaraugusto Jun 28, 2018
c17dadf
Merge pull request #39 from brave/yarn/lock
mbacchi Jun 28, 2018
f0c7d83
Fix disabled_icon path
yrliou Jun 30, 2018
bdf4ea1
Merge pull request #40 from brave/fix_disabled_icon_path
cezaraugusto Jul 1, 2018
dba1d6a
fix shields nor shrinking when advanced opt is hidden
cezaraugusto Jul 2, 2018
33e4d05
do not allow showing resources blocked if there's none
cezaraugusto Jul 2, 2018
4b19788
add `downlevelIteration` compiler option for TypeScript
cezaraugusto Jul 2, 2018
35d4150
do not show badge text if there are no resources blocked
cezaraugusto Jul 2, 2018
3e48351
Merge pull request #41 from brave/shields/53
yrliou Jul 3, 2018
6305b0d
Merge pull request #44 from brave/shields/470
yrliou Jul 3, 2018
1be1f9c
Merge pull request #42 from brave/shields/419
bbondy Jul 3, 2018
32d2fa5
Update documentation for running unit and e2e tests
Snuupy Jun 4, 2018
6449f6f
Merge pull request #27 from Snuupy/patch-1
bbondy Jul 3, 2018
e5dabe1
disable shields for any protocol other than http or https
cezaraugusto Jul 4, 2018
2fa10e5
include braveShields tests in getShieldSettingsForTabData
cezaraugusto Jul 3, 2018
4e1ecda
add urlUtils tests
cezaraugusto Jul 3, 2018
6a3c50d
do now allow duplicated items for resources blocked
cezaraugusto Jul 2, 2018
c8edd0f
always reset resources blocked on before navigation
cezaraugusto Jul 4, 2018
4856ba7
add resetBlockingResources test in ON_BEFORE_NAVIGATION
cezaraugusto Jul 4, 2018
1342b03
add shieldsPanelReducer test for duplicated blocked resources
cezaraugusto Jul 2, 2018
9b9fb28
replace yarn with npm
cezaraugusto Jul 4, 2018
3ae54d8
Merge pull request #46 from brave/yarn-to-npm
bbondy Jul 5, 2018
d4d5857
Merge pull request #45 from brave/shields/169
bbondy Jul 6, 2018
9b5332a
Merge pull request #43 from brave/shields/420
bbondy Jul 6, 2018
c339d95
remove yarn.lock
cezaraugusto Jul 9, 2018
b3fe22a
Merge pull request #47 from brave/yarn/no-yarn
bbondy Jul 9, 2018
b266a04
Testing branch protections
jumde Jul 13, 2018
cd95485
Revert test after turning on branch protection
bbondy Jul 13, 2018
d18588d
Update deps for webpack error
bbondy Jul 17, 2018
d8889e2
Update l10n
bbondy Jul 17, 2018
266ceff
Merge pull request #50 from brave/c68
bbondy Jul 20, 2018
6bed473
support open settings and reload actions
cezaraugusto Jul 24, 2018
21018e5
add tests for clicking reload and edit default settings
cezaraugusto Jul 24, 2018
3395adb
Merge pull request #51 from brave/561
yrliou Jul 25, 2018
b914102
add cosmetic filter feature
Aug 10, 2018
85aa24a
Merge pull request #48 from Snuupy/cosmeticFilter
Snuupy Aug 10, 2018
b92e9c4
prevent scrollbar in the extension container
cezaraugusto Aug 10, 2018
23f1d78
Merge pull request #52 from brave/scrollbar
cezaraugusto Aug 13, 2018
881b89b
remove option for safe browsing
cezaraugusto Aug 16, 2018
52abef2
disallow unsafe-eval for scripts and wildcard for styles in manifest …
cezaraugusto Aug 16, 2018
cf088fa
Merge pull request #54 from brave/no-safebrowsing
yrliou Aug 16, 2018
63363a7
Merge pull request #55 from brave/csp-update
bbondy Aug 17, 2018
d192d23
Remove flickering for CSS filters
Aug 16, 2018
068b02e
Fix disappearing context menu
Aug 21, 2018
b43f8ee
re-allow inline scripts fand style wildcard for dev mode
cezaraugusto Aug 23, 2018
8f599e0
Merge pull request #56 from brave/unsafe-eval-dev
cezaraugusto Aug 23, 2018
27c815c
Merge pull request #53 from Snuupy/cosmeticFilter
cezaraugusto Aug 23, 2018
cf068d4
Handle no active tab in state and no cosmetic filter list in storage
petemill Aug 27, 2018
b2511ea
Initialize the Browser Action and set some settings:
petemill Aug 25, 2018
b795097
Merge pull request #58 from petemill/fix/845-undefined-active-tab
petemill Aug 28, 2018
2ea4ff3
Merge pull request #57 from petemill/browser-action-settings
cezaraugusto Aug 28, 2018
5ae785e
Add vscode settings for linting
Aug 30, 2018
0765a91
defer reset of resource and stats blocked to the onCommitted event
cezaraugusto Sep 3, 2018
dcf1148
Merge pull request #60 from brave/429
bbondy Sep 4, 2018
55f68be
Merge pull request #59 from Snuupy/vscodeSettings
Snuupy Sep 4, 2018
4958049
actually write to the output dir so we don't rebuild every time
bridiver Sep 6, 2018
4829386
Merge pull request #61 from brave/reduce-rebuild-size
bbondy Sep 8, 2018
26c1d1c
set TARGET_GEN_DIR for dev builds
cezaraugusto Sep 17, 2018
644e8e9
remove unnecessary build stuff
cezaraugusto Sep 17, 2018
64f47d9
Merge pull request #62 from brave/rundev
cezaraugusto Sep 17, 2018
b43bcac
Use braveShields's contentSetting api
simonhong Sep 17, 2018
1e28222
Fix shields icon is in disabled state after browser launches
simonhong Sep 20, 2018
83803f1
[Cleanup] Use one method for update image and badge of icon
simonhong Sep 20, 2018
fc84f25
Merge pull request #64 from simonhong/shields_disabled
cezaraugusto Sep 20, 2018
c2222d0
Add all source files to actions' input list
simonhong Sep 21, 2018
b57edae
Only keep user-allowed origins in the noScriptInfo when a navigation …
yrliou Sep 25, 2018
64d8d2f
Merge pull request #65 from simonhong/trigger_build
yrliou Sep 26, 2018
dfac903
Merge pull request #66 from brave/fix_3p_noscript
bbondy Sep 26, 2018
a65329e
Add incognito to the extension manifest and set to split mode
bsclifton Sep 26, 2018
86e9553
Merge pull request #67 from bsclifton/manifest-add-incognito-split
yrliou Sep 27, 2018
c654fdc
Merge pull request #63 from simonhong/master
bbondy Sep 29, 2018
26b44c3
Add scope to methods which modify content settings
bsclifton Oct 1, 2018
0a62825
Merge pull request #68 from brave/content-settings-add-scope
bsclifton Oct 1, 2018
827b2df
Clear site cookies and local storage immediately on changing 'block c…
pilgrim-brave Oct 8, 2018
daf5751
clear both URLs of cookies, also satisfy linter
pilgrim-brave Oct 8, 2018
4a7020e
Merge pull request #69 from pilgrim-brave/master
bbondy Oct 9, 2018
b3c041f
fix broken tests due to missing mock in chrome.extension.inIncognitoC…
cezaraugusto Oct 10, 2018
cdc1b3a
Merge pull request #71 from brave/tests-be
cezaraugusto Oct 10, 2018
2ddb5d2
Workaround onStartup not being called for incognito
bbondy Oct 12, 2018
249db2d
Merge pull request #72 from brave/incognito-fix
bbondy Oct 12, 2018
d8e254a
Update strings from Transifex
bbondy Oct 14, 2018
ff7d7ad
Merge pull request #73 from brave/update-strings
bbondy Oct 15, 2018
fd314cb
Update l10n for brave-extension
bbondy Oct 15, 2018
fc6e987
Fix lint error
yrliou Oct 15, 2018
9e6c43e
Merge pull request #74 from brave/fix_lint
cezaraugusto Oct 15, 2018
1a60fd8
Only show shield icon as disabled when the shield is explicitly blocked.
yrliou Oct 15, 2018
27410fd
Merge pull request #75 from brave/fix_shield_icon_logic
yrliou Oct 15, 2018
e415d87
l10n update
bbondy Oct 16, 2018
fcc9314
add npm audit to travis
diracdeltas Oct 25, 2018
5871df9
Update deps to fix all npm audit issues
diracdeltas Oct 25, 2018
385bb44
make sure output of crx keygen isnt tracked in git
diracdeltas Oct 25, 2018
3f0561f
Merge pull request #76 from diracdeltas/fix/npm-audit
cezaraugusto Oct 25, 2018
7d871c2
add support for image and font loading in webpack
cezaraugusto Oct 9, 2018
8d79584
Add sitehacks and cosmetic filters from browser-laptop
bbondy Oct 28, 2018
22a24bc
Merge pull request #77 from brave/sitehacks
bbondy Oct 28, 2018
03f93e6
update brave-ui to 0.30.x
cezaraugusto Oct 9, 2018
75739a5
update react types, add skipLibCheck to tsconfig
cezaraugusto Oct 11, 2018
dcc2997
update typescript
cezaraugusto Oct 11, 2018
e916fa3
add fonts
cezaraugusto Oct 9, 2018
95ccf34
add font-src content security policy
cezaraugusto Oct 9, 2018
ba5455f
add updated locale
cezaraugusto Oct 9, 2018
d35aa41
add header and footer
cezaraugusto Oct 27, 2018
cf7ffdb
add blocked resources static panel
cezaraugusto Oct 27, 2018
217d1f6
add interface controls
cezaraugusto Oct 27, 2018
0285cc0
add privacy controls
cezaraugusto Oct 29, 2018
b0e74cf
supress warnings in dev mode
cezaraugusto Oct 11, 2018
b88061c
remove legacy files
cezaraugusto Oct 11, 2018
fb07740
fix failing tests
cezaraugusto Oct 11, 2018
b94208c
add footer test
cezaraugusto Oct 11, 2018
22288a3
add header test
cezaraugusto Oct 11, 2018
3f1f46c
add missing locale
cezaraugusto Oct 29, 2018
3b75dd4
make carat for select show on prod build
cezaraugusto Oct 29, 2018
6816ee4
add interface controls test
cezaraugusto Oct 11, 2018
5a43f95
add privacy controls test
cezaraugusto Oct 11, 2018
5e821c9
Merge pull request #78 from brave/shields3
bsclifton Oct 30, 2018
f418a5a
properly merge ads and trackers blocked list
cezaraugusto Oct 30, 2018
6ba9928
Merge pull request #79 from brave/shields_total_blocked
cezaraugusto Oct 30, 2018
80408db
add deeplink to the shields section
cezaraugusto Nov 1, 2018
1f48c9c
set stats to 99+ if resource is aboce that number
cezaraugusto Nov 2, 2018
733ce42
add tests for resouces stats >99
cezaraugusto Nov 2, 2018
24f140e
Merge pull request #82 from brave/max-blocked-size
cezaraugusto Nov 6, 2018
22838da
disallow click event when stats are 0
cezaraugusto Nov 6, 2018
9d2c935
Merge pull request #80 from brave/deeplink-shields
cezaraugusto Nov 6, 2018
038a43a
Merge pull request #81 from brave/shields-disabled-when-0
cezaraugusto Nov 6, 2018
4159c85
remove debugging console which shows up on every right-click
ignatiusreza Nov 16, 2018
911236a
Merge pull request #87 from ignatiusreza/console-log
bsclifton Jan 4, 2019
3a59fb8
Use new size graphic for browser action icon graphic
petemill Jan 8, 2019
6e00086
Merge pull request #89 from brave/brave-actions-size
petemill Jan 8, 2019
38a6a60
Update Shield icon
Jan 8, 2019
70550a1
Merge pull request #90 from brave/update-shield-icon
petemill Jan 15, 2019
ed100c2
Fix shields isn't disabled when url has port number
simonhong Jan 14, 2019
d1a956a
Merge pull request #91 from brave/fix_shields_with_port
simonhong Jan 23, 2019
32e398d
Update sinon dependency to 7.2.3
petemill Feb 7, 2019
385e580
Merge pull request #92 from brave/dep-sinon-update
bsclifton Feb 7, 2019
fce177b
Update l10n
bbondy Feb 18, 2019
b6c5851
Merge pull request #95 from brave/l10n-master
bbondy Feb 18, 2019
ed0889d
remove e2e tests as they are not working
cezaraugusto Jan 29, 2019
135a4a6
init jest migration
cezaraugusto Jan 29, 2019
a921f17
refactor actions tests
cezaraugusto Feb 7, 2019
2bc6fd4
refactor API tests
cezaraugusto Feb 8, 2019
a62d48b
refactor components tests
cezaraugusto Feb 8, 2019
f52b90c
remove windowActionsTest which is dupe from app/actions
cezaraugusto Feb 5, 2019
615048e
refactor helpers test
cezaraugusto Feb 5, 2019
839f1b9
refactor reducers test
cezaraugusto Feb 6, 2019
6113638
refactor store test
cezaraugusto Feb 6, 2019
7658349
refactor background reducers tests
cezaraugusto Feb 6, 2019
f4d666f
refactor shields state test
cezaraugusto Feb 5, 2019
94bb5b0
refactor background events tests
cezaraugusto Feb 8, 2019
286e95f
remove mocha leftovers
cezaraugusto Feb 8, 2019
f755eb3
fix security vulns found by npm audit
cezaraugusto Feb 20, 2019
3cc744c
Merge pull request #93 from brave/test2
bbondy Feb 20, 2019
b2e1b86
Add 'components/brave_extension/extension/brave_extension/' from comm…
bbondy Feb 21, 2019
cdbfca0
Adjust build config for brave-extension to fix l10n
bbondy Feb 18, 2019
a36acbd
Remove python build config for brave-extension
bbondy Feb 18, 2019
25ef43b
Use HTML instead of pug for brave-extension
bbondy Feb 18, 2019
90ff3c8
Remove brave-extension app folder
bbondy Feb 18, 2019
b7075e3
Use prod manifest and remove dev manifest
bbondy Feb 18, 2019
6ef44b9
Remove build scripts for brave-extension
bbondy Feb 18, 2019
ce125a0
Use transpile_web_ui instead of an action to copy
bbondy Feb 19, 2019
8fcb1c5
Remove README.md
bbondy Feb 19, 2019
b238465
Remove webpack config files
bbondy Feb 19, 2019
7c9b0b5
Fixup paths from app move and brave-extension to brave_extension
bbondy Feb 21, 2019
22655b3
Combine brave-extension types with brave-core
bbondy Feb 19, 2019
b8e0309
Simplify package.json since we use things from brave-core now
bbondy Feb 21, 2019
0b1d342
Remove brave-extension DEPS entry
bbondy Feb 19, 2019
f6a26ef
Remove gitignore for copied in file location
bbondy Feb 19, 2019
f91282a
brave-core fixes to build brave_extension
bbondy Feb 19, 2019
86f1b67
lint test files for brave-extension
cezaraugusto Feb 21, 2019
be6fbce
jest: use `setupFilesAfterEnv` instead of `setupTestFrameworkScriptF…
cezaraugusto Feb 21, 2019
130542f
Revert "lint test files for brave-extension"
cezaraugusto Feb 21, 2019
58a4f5e
Revert "jest: use `setupFilesAfterEnv` instead of `setupTestFramewor…
cezaraugusto Feb 21, 2019
e698aa3
Update patches with new paths for brave-extension
bbondy Feb 19, 2019
4740df1
Add in needed brave-extension deps to brave-core
bbondy Feb 19, 2019
34fa1de
Fix brave extensions popup string translation in dist zip
simonhong Feb 20, 2019
5e7f160
Fix brave_extension lint
bbondy Feb 21, 2019
c1d540d
Make Brave shields tests work with npm run test-unit
bbondy Feb 21, 2019
acc7056
Remove unused stuff and update package.json
bbondy Feb 21, 2019
fd4b1ba
Fix Rewards lint
bbondy Feb 21, 2019
209aaeb
Fix issue in brave-extension jest refactoring with circular require
bbondy Feb 21, 2019
d66a60b
Remove dupe woff2, muli.css, and poppins.css
bbondy Feb 22, 2019
03f0080
Fix cpp lint
bbondy Feb 22, 2019
16001ec
Merge pull request #1755 from brave/add-brave-extension-2
bbondy Feb 22, 2019
29385d0
Merge branch 'master' into add-brave-extension
bbondy Feb 22, 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
4 changes: 4 additions & 0 deletions components/brave_extension/extension/brave_extension/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["es2015", "stage-0", "react"],
"plugins": ["add-module-exports", "transform-decorators-legacy", "transform-runtime"]
}
69 changes: 69 additions & 0 deletions components/brave_extension/extension/brave_extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed *.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# dev files
dev/

# macOS files
.DS_Store

# Release
build/

# Ignore python compiled files
*.pyc

# Avoid committing private keys to github
*.pem
43 changes: 43 additions & 0 deletions components/brave_extension/extension/brave_extension/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
sudo: required
dist: trusty
language: node_js
node_js:
- node

branches:
only:
- master
- /\d+\.\d+\.x/

cache:
directories:
- node_modules

env:
- CXX=g++-4.8 NODE_ENV=test ACTION=lint
- CXX=g++-4.8 NODE_ENV=test ACTION=test-unit
- CXX=g++-4.8 NODE_ENV=test ACTION=test-security

addons:
apt:
sources:
- google-chrome
- ubuntu-toolchain-r-test
packages:
- google-chrome-stable
- g++-4.8

install:
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- npm install

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start &
- sleep 3

script:
- npm run test-suite
# - npm run build
# We need to pre-package a Brave build for this
# - npm run test-e2e
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"editor.formatOnPaste": true,
"editor.tabSize": 2,
"prettier.semi": false,
"javascript.preferences.quoteStyle": "auto",
"typescript.preferences.quoteStyle": "auto",
"prettier.singleQuote": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true
}
155 changes: 155 additions & 0 deletions components/brave_extension/extension/brave_extension/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
action("brave-extension") {
# Need this to fire re-pack if changed, nevertheless extension is repacked on each 2nd build
inputs = [
"app/actions/cosmeticFilterActions.ts",
"app/actions/runtimeActions.ts",
"app/actions/shieldsPanelActions.ts",
"app/actions/tabActions.ts",
"app/actions/webNavigationActions.ts",
"app/actions/windowActions.ts",
"app/assets/img/shields-off.png",
"app/assets/img/[email protected]",
"app/assets/img/[email protected]",
"app/assets/img/shields-on.png",
"app/assets/img/[email protected]",
"app/assets/img/[email protected]",
"app/background.ts",
"app/background/actions/cosmeticFilterActions.ts",
"app/background/actions/runtimeActions.ts",
"app/background/actions/shieldsPanelActions.ts",
"app/background/actions/tabActions.ts",
"app/background/actions/webNavigationActions.ts",
"app/background/actions/windowActions.ts",
"app/background/api/browserActionAPI.ts",
"app/background/api/cosmeticFilterAPI.ts",
"app/background/api/localeAPI.ts",
"app/background/api/shieldsAPI.ts",
"app/background/api/tabsAPI.ts",
"app/background/events.ts",
"app/background/events/cosmeticFilterEvents.ts",
"app/background/events/runtimeEvents.ts",
"app/background/events/shieldsEvents.ts",
"app/background/events/tabsEvents.ts",
"app/background/events/windowsEvents.ts",
"app/background/reducers.ts",
"app/background/reducers/cosmeticFilterReducer.ts",
"app/background/reducers/runtimeReducer.ts",
"app/background/reducers/shieldsPanelReducer.ts",
"app/background/store.ts",
"app/braveShieldsPanel.tsx",
"app/components/braveShields/braveShields.tsx",
"app/components/braveShields/footer.tsx",
"app/components/braveShields/header.tsx",
"app/components/braveShields/interfaceControls.tsx",
"app/components/braveShields/privacyControls.tsx",
"app/components/braveShields/blockedResources/blockedResources.tsx",
"app/components/braveShields/blockedResources/scriptsList.tsx",
"app/components/braveShields/blockedResources/staticList.tsx",
"app/constants/cosmeticFilterTypes.ts",
"app/constants/resourceIdentifiers.ts",
"app/constants/runtimeActionTypes.ts",
"app/constants/shieldsPanelTypes.ts",
"app/constants/tabTypes.ts",
"app/constants/webNavigationTypes.ts",
"app/constants/windowTypes.ts",
"app/containers/braveShields.tsx",
"app/content.ts",
"app/helpers/arrayUtils.ts",
"app/helpers/urlUtils.ts",
"app/helpers/shieldsUtils.ts",
"app/state/shieldsPanelState.ts",
"app/types/actions/cosmeticFilterActions.ts",
"app/types/actions/index.ts",
"app/types/actions/runtimeActions.ts",
"app/types/actions/shieldsPanelActions.ts",
"app/types/actions/tabActions.ts",
"app/types/actions/webNavigationActions.ts",
"app/types/actions/windowActions.ts",
"app/types/adblock/adblockTypes.ts",
"app/types/constants/cosmeticFilterTypes.ts",
"app/types/constants/resourceIdentifiers.ts",
"app/types/constants/shieldsPanelTypes.ts",
"app/types/constants/tabTypes.ts",
"app/types/constants/webNavigationTypes.ts",
"app/types/constants/windowTypes.ts",
"app/types/global/chrome.d.ts",
"app/types/global/react-chrome-redux.d.ts",
"app/types/global/tests.d.ts",
"app/types/other/blockTypes.ts",
"app/types/other/noScriptInfo.ts",
"app/types/state/mainState.ts",
"app/types/state/shieldsPannelState.ts",
"app/views/background.pug",
"app/views/braveShieldsPanel.pug",
"app/views/inject.pug",
]
script = "py-scripts/build-brave-extension.py"

build_dir = "${root_gen_dir}/brave_extension"

args = [ "--output_dir", rebase_path("//brave/browser/resources/brave_extension"),
"--brave_extension_dir", rebase_path("."),
"--build_dir", rebase_path(build_dir) ]

outputs = [
"$build_dir/background.html",
"$build_dir/manifest.json",
"$build_dir/js/background.bundle.js",
"$build_dir/js/content.bundle.js",
"$build_dir/js/braveShieldsPanel.bundle.js",
"$build_dir/braveShieldsPanel.html",
"$build_dir/bravelizer.css",
"$build_dir/removeEmptyElements.css",
"$build_dir/siteHack-marketwatch.com.css",
"$build_dir/siteHack-glennbeck.com.js",
"$build_dir/siteHack-coinmarketcap.com.css",
"$build_dir/img/icon-16.png",
"$build_dir/img/icon-32.png",
"$build_dir/img/icon-48.png",
"$build_dir/img/icon-64.png",
"$build_dir/img/icon-128.png",
"$build_dir/img/icon-256.png",
"$build_dir/img/shields-off.png",
"$build_dir/img/[email protected]",
"$build_dir/img/[email protected]",
"$build_dir/img/shields-on.png",
"$build_dir/img/[email protected]",
"$build_dir/img/[email protected]",
"$build_dir/_locales/en_US/messages.json",
]

# For macOS deps is bounded in //chrome:chrome_framework
# For Windows installer copying is done in \\chrome\tools\build\win\create_installer_archive.py
# Deps below is used for Linux and debugging environment output dir on Windows
if (!is_mac) {
deps = [":copy-extension-localization"]
}
}

if (is_mac) {
bundle_data("brave_extension_framework_bundle_data") {
sources = [ "$root_out_dir/resources/brave_extension" ]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]

public_deps = [ ":copy-extension-localization" ]
}
}

action("copy-extension-localization") {
script = "py-scripts/copy-brave-extension-localization.py"

# changes of something from the list below makes script re-run
sources = [
"//brave/vendor/brave-extension/app/_locales/en_US/messages.json",
]

resources_target_dir = "$root_build_dir/resources"

args = [
rebase_path("$resources_target_dir"),
]

outputs = [
"$resources_target_dir/brave_extension",
]
}
Loading