8000 Add support for melos · Sub6Resources/flutter_html@0f1bee0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f1bee0

Browse files
committed
Add support for melos
1 parent 4705995 commit 0f1bee0

File tree

22 files changed

+219
-54
lines changed

22 files changed

+219
-54
lines changed

.circleci/config.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
version: 2.1
22
orbs:
33
codecov: codecov/codecov@1.0.2
4+
executors:
5+
default-executor:
6+
docker:
7+
- image: cirrusci/flutter:stable
8+
resource_class: large
9+
shell: /bin/bash
410
jobs:
511
build:
6-
docker:
7-
- image: cirrusci/flutter
12+
executor: default-executor
813
steps:
914
- checkout
1015
- run: flutter --version
11-
- run: flutter test --coverage
16+
- run:
17+
name: Set up environment
18+
command: |
19+
echo 'export PATH=$HOME/.pub-cache/bin:$PATH' >> $BASH_ENV
20+
source $BASH_ENV
21+
- run:
22+
name: Setup melos
23+
command: |
24+
flutter pub global activate melos
25+
melos --version
26+
melos bootstrap
27+
- run:
28+
name: Run Test Suite
29+
command: melos run test
30+
- run:
31+
name: Generate Coverage Report
32+
command: melos run gen_coverage
1233
- codecov/upload:
13-
file: coverage/lcov.info
34+
file: coverage_report/lcov.info

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,5 @@ modules.xml
151151
**/flutter_export_environment.sh
152152

153153
/example/ios/Flutter/Flutter.podspec
154+
155+
**/pubspec_overrides.yaml

CHANGELOG.md

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,53 @@
1-
## F438 3.0.0-alpha.6
1+
## 3.0.0-alpha.8
2+
3+
- **FIX**: Add meta as dev dependency for flutter_html_svg.
4+
5+
## 3.0.0-alpha.7
26

3-
- **FIX**: fix textShadow color declaration handler.
4-
- **FIX**: ol use default style.
5-
- **FIX**: Crash when a tr tag includes text node.
6-
- **FEAT**: exposes fontFamilyFallback parameter.
7+
- **FIX**: Add meta as a dev dependency.
8+
- **DOCS**: Update CHANGELOG.md for 3.0.0-alpha.6.
9+
10+
## 3.0.0-alpha.6
711

8-
## [3.0.0-alpha.5] - June 9, 2022:
12+
- **FIX** #731 Resolve newline `<br>` issue
13+
- **FIX** Align the baseline of inline content with the baseline of its parent flow, even if it has padding or borders
14+
- **FIX** Improved fontSize inheritance when cascading styles
15+
- **FIX** `auto` margins now work for any `Display.BLOCK` element.
16+
- **FIX** `auto` width and height is now the default, rather than `null`
17+
- **FIX** New CSSBoxWidget that handles calculations of child sizes for a more accurate HTML/CSS layout
18+
- **BREAKING** New `Margin`, `Height`, and `Width` classes that allow `em`, `rem`, `px`, `auto`, and `%` values to be given
19+
- **FEAT** Negative margins are now allowed
20+
- **FIX** Updated default `p` and `h1-6` styles to use `em` for better font scaling
21+
- **BREAKING** Package now requires Dart sdk >= Dart 2.17
22+
23+
## 3.0.0-alpha.5 - June 9, 2022:
924
* Fixed hot reloads, thanks @arjenmels
1025
* Fixed link taps not working
1126
* Improvements in README
1227

13-
## [3.0.0-alpha.3] - April 14, 2022:
28+
## 3.0.0-alpha.3 - April 14, 2022:
1429
* Fixed styling not being applied to list item markers
1530
* [video] Fixed crash when iframe or video tags used unsupported/incorrect height or width
1631

17-
## [3.0.0-alpha.2] - January 5, 2022:
32+
## 3.0.0-alpha.2 - January 5, 2022:
1833
* **BREAKING** Full modularization using split packages; see our upgrade guide or use flutter_html_all
1934

20-
## [3.0.0-alpha.1] - December 21, 2021:
35+
## 3.0.0-alpha.1 - December 21, 2021:
2136
* **BREAKING** Reworked custom renders pending full modularation in 3.0.0
2237
* Extended support custom render when using SelectableHtml
2338
* Updated flutter_svg to 1.0.0
2439
* Support flutter_webview 3.x
2540
* Automatic disposal of video and audio controllers
2641
* Fix block elements bottom spacing in table cells
2742

28-
## [2.2.1] - December 8, 2021:
43+
## 2.2.1 - December 8, 2021:
2944
* Allow styling on ruby tags
3045
* Allow width/height/alignment styling on table/tr/td tags
3146
* Prevent images causing rebuilding and leaking memory
3247
* Fixes display of list items on iOS with font weights below 400
3348
* Prevent crash on negative margins or paddings
3449

35-
## [2.2.0] - November 29, 2021:
50+
## 2.2.0 - November 29, 2021:
3651
* Explicitly declare multiplatform support
3752
* Extended and fixed list-style (marker) support
3853
* Basic support for height/width css properties
@@ -45,34 +60,34 @@
4560
* Prevent crash on empty <table> tag and tables with both colspan/rowspan
4661
* Prevent crash on use of negative margins in css
4762

48-
## [2.1.5] - October 7, 2021:
63+
## 2.1.5 - October 7, 2021:
4964
* Ignore unsupported custom style selectors when using fromCss
5065
* Fix SVG tag usage inside tables
5166
* Properly fix regression in usage of line breaks
5267

53-
## [2.1.4] - October 3, 2021:
68+
## 2.1.4 - October 3, 2021:
5469
* Fix regression in usage of line breaks in body being stripped
5570

56-
## [2.1.3] - October 1, 2021:
71+
## 2.1.3 - October 1, 2021:
5772
* Update minimum versions of dependencies for Flutter 2.5 compatibility
5873
* Extended and fixed support for css shadow
5974
* Fix block tags with explicit whitespace from being stripped
6075

61-
## [2.1.2] - September 2, 2021:
76+
## 2.1.2 - September 2, 2021:
6277
* Allow setting selectionControls with SelectableHtml
6378
* Fix onLinkTap not working with SelectableHtml
6479
* Don't crash when parsing unsupported :hover
6580
* Prevent endless loading when using animated images
6681

67-
## [2.1.1] - July 28, 2021:
82+
## 2.1.1 - July 28, 2021:
6883
* Stable release with all 2.1.1-preview.X changes
6984

70-
## [2.1.1-preview.0] - July 27, 2021:
85+
## 2.1.1-preview.0 - July 27, 2021:
7186
* Improves hr tag support
7287
* Fixes a leading whitespace issue
7388
* Fixes some crashes with CSS parsing
7489

75-
## [2.1.0] - June 3, 2021:
90+
## 2.1.0 - June 3, 2021:
7691
* SelectableHtml widget (supporting a subset of tags) which allow text selection
7792
* Fixed shrinkWrap to actually shrink the horizontal space
7893
* Support style tags to apply styling from inline css
@@ -88,10 +103,10 @@
88103
* Updates external dependencies
89104
* Raised minimum Flutter version to 2.2.0
90105

91-
## [2.0.0] - April 29, 2021:
106+
## 2.0.0 - April 29, 2021:
92107
* Stable release with all 2.0.0-nullsafety.X changes
93108

94-
## [2.0.0-nullsafety.1] - April 29, 2021:
109+
## 2.0.0-nullsafety.1 - April 29, 2021:
95110
* Support basic MathML
96111
* Support inner links
97112
* Supply full context tree to custom render
@@ -105,7 +120,7 @@
105120
* Fixed `failed assertion` error when tap-scrolling on any link
106121
* Updated dependencies
107122

108-
## [2.0.0-nullsafety.0] - March 5, 2021:
123+
## 2.0.0-nullsafety.0 - March 5, 2021:
109124
* Nullsafety support
110125
* Official Flutter Web support
111126
* New features & fixes for lists:
@@ -118,7 +133,7 @@
118133
* Fixed `<audio>` on iOS ("_duration called on null" exception)
119134
* Updated dependencies
120135

121-
## [1.3.0] - February 16, 2021:
136+
## 1.3.0 - February 16, 2021:
122137
* New image loading API
123138
* Image loading with request headers, from relative paths and custom loading widget
124139
* SVG image support from network or local assets
@@ -133,25 +148,25 @@
133148
* Fixed issue where iframes would not update when their `src`s changed in the HTML data
134149
* Updated dependencies for Flutter 1.26+
135150

136-
## [1.2.0] - January 14, 2021:
151+
## 1.2.0 - January 14, 2021:
137152
* Support irregular table sizes
138153
* Allow for returning `null` from a customRender function to disable the widget
139154

140-
## [1.1.1] - November 22, 2020:
155+
## 1.1.1 - November 22, 2020:
141156
* Update dependencies
142157

143-
## [1.1.0] - November 22, 2020:
158+
## 1.1.0 - November 22, 2020:
144159
* Add support for inline styles
145160
* Update dependencies
146161

147-
## [1.0.2] - August 8, 2020:
162+
## 1.0.2 - August 8, 2020:
148163
* Fix text scaling issues
149164
* Update dependencies
150165

151-
## [1.0.1] - August 8, 2020:
166+
## 1.0.1 - August 8, 2020:
152167
* Fixed flutter_svg: ^0.18.0
153168

154-
# [1.0.0]
169+
# 1.0.0
155170
* BREAKING CHANGES (see the [Migration Guide](https://github.com/Sub6Resources/flutter_html/wiki/1.0.0-Migration-Guide) for a full overview of breaking changes.):
156171
* The default parser has been completely rewritten and the RichText parser has been removed.
157172
* `useRichText` no longer is necessary (The new parser uses RichText under the hood)

analysis_options.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

combine_coverage.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')"
4+
5+
if grep flutter pubspec.yaml > /dev/null; then
6+
if [ -d "coverage" ]; then
7+
# combine line coverage info from package tests to a common file
8+
if [ ! -d "$MELOS_ROOT_PATH/coverage_report" ]; then
9+
mkdir "$MELOS_ROOT_PATH/coverage_report"
10+
fi
11+
sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info >> "$MELOS_ROOT_PATH/coverage_report/lcov.info"
12+
rm -rf "coverage"
13+
fi
14+
fi

lib/src/styled_element.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_html/src/css_parser.dart';
3-
import 'package:flutter_html/src/style/margin.dart';
43
import 'package:flutter_html/style.dart';
54
import 'package:html/dom.dart' as dom;
65
//TODO(Sub6Resources): don't use the internal code of the html package as it may change unexpectedly.

melos.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: flutter_html
2+
repository: https://github.com/sub6resources/flutter_html
3+
4+
packages:
5+
- '*'
6+
- packages/**
7+
8+
command:
9+
bootstrap:
10+
usePubspecOverrides: true
11+
12+
scripts:
13+
analyze:
14+
exec: flutter analyze .
15+
16+
test:selective_unit_test:
17+
run: melos exec --dir-exists="test" --fail-fast -- flutter test --no-pub --coverage
18+
description: Run Flutter tests for a specific package in this project.
19+
select-package:
20+
flutter: true
21+
dir-exists: test
22+
23+
test:
24+
run: melos run test:selective_unit_test --no-select
25+
description: Run all Flutter tests in this project.
26+
27+
gen_coverage: melos exec -- "\$MELOS_ROOT_PATH/combine_coverage.sh"

packages/flutter_html_all/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 3.0.0-alpha.8
2+
3+
- Update a dependency to the latest release.
4+
5+
## 3.0.0-alpha.7
6+
7+
- Update a dependency to the latest release.
8+
19
## 3.0.0-alpha.6
210

311
- Update a dependency to the latest release.

packages/flutter_html_all/pubspec.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_html_all
22
description: All optional flutter_html widgets, bundled into a single package.
3-
version: 3.0.0-alpha.6
3+
version: 3.0.0-alpha.8
44
homepage: https://github.com/Sub6Resources/flutter_html
55

66
environment:
@@ -11,13 +11,13 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313
html: '>=0.15.0 <1.0.0'
14-
flutter_html: ^3.0.0-alpha.6
15-
flutter_html_audio: ^3.0.0-alpha.4
16-
flutter_html_iframe: ^3.0.0-alpha.4
17-
flutter_html_math: ^3.0.0-alpha.4
18-
flutter_html_svg: ^3.0.0-alpha.4
19-
flutter_html_table: ^3.0.0-alpha.4
20-
flutter_html_video: ^3.0.0-alpha.5
14+
flutter_html: ^3.0.0-alpha.8
15+
flutter_html_audio: ^3.0.0-alpha.6
16+
flutter_html_iframe: ^3.0.0-alpha.6
17+
flutter_html_math: ^3.0.0-alpha.6
18+
flutter_html_svg: ^3.0.0-alpha.6
19+
flutter_html_table: ^3.0.0-alpha.6
20+
flutter_html_video: ^3.0.0-alpha.7
2121
# flutter_html_audio:
2222
# path: ../flutter_html_audio
2323
# flutter_html_iframe:

packages/flutter_html_audio/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 3.0.0-alpha.6
2+
3+
- Update a dependency to the latest release.
4+
5+
## 3.0.0-alpha.5
6+
7+
- Update a dependency to the latest release.
8+
19
## 3.0.0-alpha.4
210

311
- Update a dependency to the latest release.

0 commit comments

Comments
 (0)
0