Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dart-archive/path
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a95f1e9
Choose a base ref
..
head repository: dart-archive/path
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 24b58a2
Choose a head ref
Showing with 82 additions and 57 deletions.
  1. +1 −1 .github/workflows/dart.yml
  2. +34 −0 .github/workflows/no-response.yml
  3. +14 −0 .github/workflows/publish.yaml
  4. +6 −2 CHANGELOG.md
  5. +10 −43 analysis_options.yaml
  6. +5 −3 lib/path.dart
  7. +4 −4 lib/src/context.dart
  8. +1 −1 lib/src/style/posix.dart
  9. +3 −3 pubspec.yaml
  10. +2 −0 test/browser_test.dart
  11. +2 −0 test/io_test.dart
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
sdk: [2.12.0, dev]
sdk: [2.19.0, dev]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
34 changes: 34 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# A workflow to close issues where the author hasn't responded to a request for
# more information; see https://github.com/godofredoc/no-response for docs.

name: No Response

# Both `issue_comment` and `scheduled` event types are required.
on:
issue_comment:
types: [created]
schedule:
# Every day at 8am
- cron: '0 8 * * *'

# All permissions not specified are set to 'none'.
permissions:
issues: write

jobs:
noResponse:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'dart-lang' }}
steps:
- uses: godofredoc/no-response@0ce2dc0e63e1c7d2b87752ceed091f6d32c9df09
with:
responseRequiredLabel: "needs-info"
responseRequiredColor: 4774bc
daysUntilClose: 14
# Comment to post when closing an Issue for lack of response.
closeComment: >
Without additional information we're not able to resolve this issue,
so it will be closed at this time. You're still free to add more
info and respond to any questions above, though. We'll reopen the
issue if you do. Thanks for your contribution!
token: ${{ github.token }}
14 changes: 14 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# A CI configuration to auto-publish pub packages.

name: Publish

on:
pull_request:
branches: [ master ]
push:
tags: [ 'v[0-9]+.[0-9]+.[0-9]+*' ]

jobs:
publish:
if: ${{ github.repository_owner == 'dart-lang' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
## 1.8.4-dev

* Require Dart 2.19

## 1.8.3

* Support up to 16 arguments in join function and up to 15 arguments in absolute function.

## 1.8.2

* Enable the `avoid_dynamic_calls` lint.
* Popuate the pubspec `repository` field.
* Populate the pubspec `repository` field.

## 1.8.1

@@ -45,7 +49,7 @@
## 1.6.3

* Don't throw a FileSystemException from `current` if the working directory has
been deleted but we have a cached one we can use.
been deleted, but we have a cached one we can use.

## 1.6.2

53 changes: 10 additions & 43 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,33 @@
include: package:lints/recommended.yaml
include: package:dart_flutter_team_lints/analysis_options.yaml

analyzer:
language:
strict-casts: true

linter:
rules:
- avoid_catching_errors
- avoid_dynamic_calls
- avoid_function_literals_in_foreach_calls
- avoid_private_typedef_functions
- avoid_renaming_method_parameters
- avoid_returning_null_for_void
- avoid_unused_constructor_parameters
- avoid_void_async
- await_only_futures
- camel_case_types
- cancel_subscriptions
- collection_methods_unrelated_type
- combinators_ordering
- comment_references
- constant_identifier_names
- control_flow_in_finally
- directives_ordering
- empty_statements
- file_names
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- dangling_library_doc_comments
- implicit_call_tearoffs
- join_return_with_assignment
- lines_longer_than_80_chars
- list_remove_unrelated_type
- library_annotations
- missing_whitespace_between_adjacent_strings
- no_runtimeType_toString
- non_constant_identifier_names
- only_throw_errors
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_asserts_in_initializer_lists
- prefer_const_constructors
- prefer_const_declarations
- prefer_expression_function_bodies
- prefer_final_locals
- prefer_function_declarations_over_variables
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_interpolation_to_compose_strings
- prefer_is_not_operator
- prefer_null_aware_operators
- prefer_relative_imports
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- sort_pub_dependencies
- test_types_in_equals
- throw_in_finally
- unnecessary_brace_in_string_interps
- unnecessary_lambdas
- unnecessary_null_aware_assignments
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_string_interpolations
- unnecessary_library_directive
- unreachable_from_main
- use_string_buffers
- void_checks
- use_string_in_part_of_directives
- use_super_parameters
8 changes: 5 additions & 3 deletions lib/path.dart
Original file line number Diff line number Diff line change
@@ -27,6 +27,8 @@
///
/// This will join "directory" and "file.txt" using the Windows path separator,
/// even when the program is run on a POSIX machine.
library;

import 'src/context.dart';
import 'src/style.dart';

@@ -50,7 +52,7 @@ final Context url = Context(style: Style.url);

/// The system path context.
///
/// This differs from a context created with [new Context] in that its
/// This differs from a context created with [Context.new] in that its
/// [Context.current] is always the current working directory, rather than being
/// set once when the context is created.
final Context context = createInternal();
@@ -432,7 +434,7 @@ String setExtension(String path, String extension) =>
/// If [uri] is relative, a relative path will be returned.
///
/// p.fromUri('path/to/foo'); // -> 'path/to/foo'
String fromUri(uri) => context.fromUri(uri);
String fromUri(Object? uri) => context.fromUri(uri!);

/// Returns the URI that represents [path].
///
@@ -476,4 +478,4 @@ Uri toUri(String path) => context.toUri(path);
/// // URL at "https://dart.dev/root/path"
/// p.prettyUri('https://dart.dev/root/path/a/b.dart'); // -> r'a/b.dart'
/// p.prettyUri('file:///root/path'); // -> 'file:///root/path'
String prettyUri(uri) => context.prettyUri(uri);
String prettyUri(Object? uri) => context.prettyUri(uri!);
8 changes: 4 additions & 4 deletions lib/src/context.dart
Original file line number Diff line number Diff line change
@@ -1037,7 +1037,7 @@ class Context {
/// If [uri] is relative, a relative path will be returned.
///
/// path.fromUri('path/to/foo'); // -> 'path/to/foo'
String fromUri(uri) => style.pathFromUri(_parseUri(uri));
String fromUri(Object? uri) => style.pathFromUri(_parseUri(uri!));

/// Returns the URI that represents [path].
///
@@ -1088,8 +1088,8 @@ class Context {
/// context.prettyUri('https://dart.dev/root/path/a/b.dart');
/// // -> r'a/b.dart'
/// context.prettyUri('file:///root/path'); // -> 'file:///root/path'
String prettyUri(uri) {
final typedUri = _parseUri(uri);
String prettyUri(Object? uri) {
final typedUri = _parseUri(uri!);
if (typedUri.scheme == 'file' && style == Style.url) {
return typedUri.toString();
} else if (typedUri.scheme != 'file' &&
@@ -1113,7 +1113,7 @@ class Context {
/// Parses argument if it's a [String] or returns it intact if it's a [Uri].
///
/// Throws an [ArgumentError] otherwise.
Uri _parseUri(uri) {
Uri _parseUri(Object uri) {
if (uri is String) return Uri.parse(uri);
if (uri is Uri) return uri;
throw ArgumentError.value(uri, 'uri', 'Value must be a String or a Uri');
2 changes: 1 addition & 1 deletion lib/src/style/posix.dart
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ class PosixStyle extends InternalStyle {
@override
final rootPattern = RegExp(r'^/');
@override
final relativeRootPattern = null;
Pattern? get relativeRootPattern => null;

@override
bool containsSeparator(String path) => path.contains('/');
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: path
version: 1.8.3
version: 1.8.4-dev
description: >-
A string-based path manipulation library. All of the path operations you know
and love, with solid support for Windows, POSIX (Linux and Mac OS X), and the
web.
repository: https://github.com/dart-lang/path

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.19.0 <3.0.0"

dev_dependencies:
lints: ^1.0.0
dart_flutter_team_lints: ^0.1.0
test: ^1.16.0
2 changes: 2 additions & 0 deletions test/browser_test.dart
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('browser')
library;

import 'dart:html';

import 'package:path/path.dart' as path;
2 changes: 2 additions & 0 deletions test/io_test.dart
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

@TestOn('vm')
library;

import 'dart:io' as io;

import 'package:path/path.dart' as path;