Skip to content

Commit

Permalink
Remove dependency on package:charcode (flutter#66)
Browse files Browse the repository at this point in the history
Copy in the charcode constants that are used in this package to a
private library.
  • Loading branch information
natebosch authored Nov 4, 2020
1 parent df8f533 commit 49ff31e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 1.8.0-nullsafety.5-dev

# 1.8.0-nullsafety.4

* Update SDK constraints to `>=2.12.0-0 <3.0.0` based on beta release
Expand Down
15 changes: 15 additions & 0 deletions lib/src/charcode.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// "Carriage return" control character.
const int $cr = 0x0D;

/// "Line feed" control character.
const int $lf = 0x0A;

/// Space character.
const int $space = 0x20;

/// "Horizontal Tab" control character, common name.
const int $tab = 0x09;
2 changes: 1 addition & 1 deletion lib/src/highlighter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import 'dart:math' as math;

import 'package:charcode/charcode.dart';
import 'package:collection/collection.dart';
import 'package:path/path.dart' as p;
import 'package:term_glyph/term_glyph.dart' as glyph;

import 'charcode.dart';
import 'colors.dart' as colors;
import 'location.dart';
import 'span.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/span.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:charcode/charcode.dart';
import 'package:path/path.dart' as p;
import 'package:term_glyph/term_glyph.dart' as glyph;

import 'charcode.dart';
import 'file.dart';
import 'highlighter.dart';
import 'location.dart';
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: source_span
version: 1.8.0-nullsafety.4
version: 1.8.0-nullsafety.5-dev

description: A library for identifying source spans and locations.
homepage: https://github.com/dart-lang/source_span
Expand All @@ -8,7 +8,6 @@ environment:
sdk: ">=2.12.0-0.0 <3.0.0"

dependencies:
charcode: '>=1.2.0-nullsafety <1.2.0'
collection: '>=1.15.0-nullsafety <1.15.0'
path: '>=1.8.0-nullsafety <1.8.0'
term_glyph: '>=1.2.0-nullsafety <1.2.0'
Expand Down

0 comments on commit 49ff31e

Please sign in to comment.