Skip to content

Commit

Permalink
Fixes buildCloudFunctions default paths on non-unix systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexios80 committed Sep 12, 2024
1 parent 230f2bb commit 88bb1ec
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
run: dart format --set-exit-if-changed .
- name: Analyze
run: dart analyze --fatal-infos .
# TODO: Run custom_lint when https://github.com/invertase/dart_custom_lint/issues/271 lands

pana:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.5

- Fixes `buildCloudFunctions` default paths on non-unix systems

## 0.0.4

- Updates README with the proper `package.json` scripts that are used during function deployment
Expand Down
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:rexios_lints/dart/package.yaml
include: package:rexios_lints/dart/package_extra.yaml
2 changes: 1 addition & 1 deletion example/fji_example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:rexios_lints/flutter/core.yaml
include: package:rexios_lints/flutter/core_extra.yaml
2 changes: 1 addition & 1 deletion example/fji_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
rexios_lints: ^8.0.0
rexios_lints: ^8.1.0

flutter:
uses-material-design: true
2 changes: 1 addition & 1 deletion example/fji_example_core/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:rexios_lints/flutter/core.yaml
include: package:rexios_lints/flutter/core_extra.yaml
2 changes: 1 addition & 1 deletion example/fji_example_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ environment:
sdk: ^3.0.0

dev_dependencies:
rexios_lints: ^8.0.0
rexios_lints: ^8.1.0
2 changes: 1 addition & 1 deletion example/fji_example_core_flutter/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:rexios_lints/flutter/core.yaml
include: package:rexios_lints/flutter/core_extra.yaml
2 changes: 1 addition & 1 deletion example/fji_example_core_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
cloud_firestore: ^5.2.1

dev_dependencies:
rexios_lints: ^8.0.0
rexios_lints: ^8.1.0
build_runner: ^2.4.12
json_serializable: ^6.8.0
cloud_firestore_odm_generator: ^1.0.0-dev.88
2 changes: 1 addition & 1 deletion example/fji_example_core_js_interop/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:rexios_lints/flutter/core.yaml
include: package:rexios_lints/flutter/core_extra.yaml
2 changes: 1 addition & 1 deletion example/fji_example_core_js_interop/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ dependencies:
path: ../../

dev_dependencies:
rexios_lints: ^8.0.0
rexios_lints: ^8.1.0
build_runner: ^2.4.12
json_serializable: ^6.8.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include: package:rexios_lints/dart/core.yaml
include: package:rexios_lints/dart/core_extra.yaml
2 changes: 1 addition & 1 deletion example/fji_example_firebase/functions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ dependencies:
path: ../../../

dev_dependencies:
rexios_lints: ^8.0.0
rexios_lints: ^8.1.0
8 changes: 6 additions & 2 deletions lib/build.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:io';

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

/// The optimization level for the dart2js compiler
enum OptimizationLevel {
Expand Down Expand Up @@ -39,9 +40,12 @@ const _endDart = '/// END DART';
/// which will be used by the Functions runtime
Future<void> buildCloudFunctions({
OptimizationLevel optimization = OptimizationLevel.O2,
String output = 'lib/index.js',
String input = 'src/index.dart',
String? output,
String? input,
}) async {
output ??= path.join('lib', 'index.js');
input ??= path.join('src', 'index.dart');

final build = await Process.start(
'dart',
['compile', 'js', '-$optimization', '-o', output, input],
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: firebase_js_interop
description: Wrappers and tools for composing Firebase Cloud Functions in the Dart language
homepage: https://github.com/IO-Design-Team/firebase_js_interop
version: 0.0.4
version: 0.0.5

environment:
sdk: ^3.3.0

dependencies:
node_preamble: ^2.0.2
json_annotation: ^4.9.0
path: ^1.9.0

dev_dependencies:
test: ^1.24.0
rexios_lints: ^8.0.0
rexios_lints: ^8.1.0

platforms:
web:
Expand Down

0 comments on commit 88bb1ec

Please sign in to comment.