Skip to content

Commit e20fb00

Browse files
committed
Switch back to npm, yada yada. Prep for release
1 parent 5793d6f commit e20fb00

File tree

7 files changed

+61
-14337
lines changed

7 files changed

+61
-14337
lines changed

.github/workflows/test.yml

+38-70
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- v16
78
paths-ignore:
89
- "**/*.md"
910
pull_request:
@@ -26,29 +27,20 @@ jobs:
2627
uses: actions/setup-node@v3
2728
with:
2829
node-version: '18'
29-
check-latest: true
30+
check-latest: false
3031
- name: node_modules cache
3132
uses: actions/cache@v3
3233
id: node_modules_cache
3334
with:
3435
path: ./node_modules
35-
key: ${{ runner.os }}-16-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
36-
- name: Yarn offline cache
37-
if: steps.node_modules_cache.outputs.cache-hit != 'true'
38-
uses: actions/cache@v3
39-
with:
40-
path: ~/.npm-packages-offline-cache
41-
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
36+
key: ${{ runner.os }}-18-${{ hashFiles('package-lock.json') }}
37+
restore-keys: |
38+
${{ runner.os }}-18-
4239
- name: Install deps
4340
if: steps.node_modules_cache.outputs.cache-hit != 'true'
4441
run: |
45-
yarn config set ignore-engines true
46-
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
47-
yarn config set network-timeout 300000
48-
yarn config set yarn-offline-mirror-pruning true
49-
yarn install --frozen-lockfile --prefer-offline
42+
npm ci
5043
- name: Build
51-
id: yarn-pack-dir
5244
run: ./tools/build.sh
5345
- name: 'Upload Artifact'
5446
uses: actions/upload-artifact@v3
@@ -79,36 +71,28 @@ jobs:
7971
uses: actions/cache@v3
8072
with:
8173
path: ./node_modules
82-
key: ${{ runner.os }}-${{ matrix.node }}-16-9-12-8-node_modules-${{ hashFiles('yarn.lock') }}
83-
- name: Yarn offline cache
84-
uses: actions/cache@v3
85-
with:
86-
path: ~/.npm-packages-offline-cache
87-
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
88-
- name: Configure yarn
89-
run: |
90-
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
91-
yarn config set network-timeout 300000
92-
yarn config set ignore-engines true
93-
- name: Yarn install
74+
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
75+
restore-keys: |
76+
${{ runner.os }}-${{ matrix.node }}-
77+
- name: Install deps
9478
if: steps.node_modules_cache.outputs.cache-hit != 'true'
95-
run: yarn install --frozen-lockfile --prefer-offline
79+
run: npm ci
9680
- name: Download Artifacts
9781
uses: actions/download-artifact@v3
9882
- name: Relocate Artifacts
9983
run: mv angularfire-${{ github.run_id }} dist
10084
- name: Test Node
10185
run: |
102-
yarn build:jasmine
103-
yarn test:node
104-
- name: ng-build yarn install
105-
run: |
106-
cd ./test/ng-build
107-
yarn --prefer-offline
108-
- name: ng-build prerender
109-
run: |
110-
cd ./test/ng-build
111-
yarn prerender
86+
npm run build:jasmine
87+
npm run test:node
88+
#- name: ng-build yarn install
89+
# run: |
90+
# cd ./test/ng-build
91+
# yarn --prefer-offline
92+
#- name: ng-build prerender
93+
# run: |
94+
# cd ./test/ng-build
95+
# yarn prerender
11296

11397
browser:
11498
runs-on: ${{ matrix.os }}
@@ -129,7 +113,7 @@ jobs:
129113
uses: actions/setup-node@v3
130114
with:
131115
node-version: 18
132-
check-latest: true
116+
check-latest: false
133117
- name: Setup java
134118
uses: actions/setup-java@v3
135119
with:
@@ -140,20 +124,12 @@ jobs:
140124
uses: actions/cache@v3
141125
with:
142126
path: ./node_modules
143-
key: ${{ runner.os }}-${{ matrix.node }}-16-9-12-8-node_modules-${{ hashFiles('yarn.lock') }}
144-
- name: Yarn offline cache
145-
uses: actions/cache@v3
146-
with:
147-
path: ~/.npm-packages-offline-cache
148-
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
149-
- name: Configure yarn
150-
run: |
151-
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
152-
yarn config set network-timeout 300000
153-
yarn config set ignore-engines true
154-
- name: Yarn install
127+
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
128+
restore-keys: |
129+
${{ runner.os }}-${{ matrix.node }}-
130+
- name: Install deps
155131
if: steps.node_modules_cache.outputs.cache-hit != 'true'
156-
run: yarn install --frozen-lockfile --prefer-offline
132+
run: npm ci
157133
- name: Firebase emulator cache
158134
uses: actions/cache@v3
159135
with:
@@ -164,7 +140,7 @@ jobs:
164140
- name: Relocate Artifacts
165141
run: mv angularfire-${{ github.run_id }} dist
166142
- name: Test browser
167-
run: yarn test:${{ matrix.browser }}
143+
run: npm run test:${{ matrix.browser }}
168144

169145
contribute:
170146
runs-on: ${{ matrix.os }}
@@ -187,28 +163,20 @@ jobs:
187163
id: node_modules_cache
188164
with:
189165
path: ./node_modules
190-
key: ${{ runner.os }}-${{ matrix.node }}-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
191-
- name: Yarn offline cache
192-
if: steps.node_modules_cache.outputs.cache-hit != 'true'
193-
uses: actions/cache@v3
194-
with:
195-
path: ~/.npm-packages-offline-cache
196-
key: yarn-offline-${{ hashFiles('**/yarn.lock') }}
166+
key: ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
167+
restore-keys: |
168+
${{ runner.os }}-${{ matrix.node }}-
197169
- name: Install deps
198170
if: steps.node_modules_cache.outputs.cache-hit != 'true'
199-
run: |
200-
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
201-
yarn config set network-timeout 300000
202-
yarn config set ignore-engines true
203-
yarn install --frozen-lockfile --prefer-offline
171+
run: npm ci
204172
- name: Lint
205-
run: yarn lint
173+
run: npm run lint
206174
- name: Build
207-
run: yarn build
175+
run: npm run build
208176
- name: Test Node
209177
run: |
210-
yarn build:jasmine
211-
yarn test:node
178+
npm run build:jasmine
179+
npm run test:node
212180
- name: Firebase emulator cache
213181
uses: actions/cache@v3
214182
with:
@@ -220,7 +188,7 @@ jobs:
220188
distribution: 'temurin'
221189
java-version: '11'
222190
- name: Test headless
223-
run: yarn test:chrome-headless
191+
run: npm run test:chrome-headless
224192
# Tests are flaky on Windows
225193
continue-on-error: ${{ matrix.os == 'windows-latest' }}
226194

@@ -243,7 +211,7 @@ jobs:
243211
with:
244212
node-version: '18'
245213
registry-url: 'https://registry.npmjs.org'
246-
check-latest: true
214+
check-latest: false
247215
- name: 'Download Artifacts'
248216
uses: actions/download-artifact@v3
249217
- name: Publish

package.json

+7-20
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"homepage": "https://github.com/angular/angularfire#readme",
4747
"dependencies": {
48-
"@angular-devkit/architect": "^0.1601.1",
48+
"@angular-devkit/architect": "~0.1600.0",
4949
"@angular-devkit/core": "^16.0.0",
5050
"@angular-devkit/schematics": "^16.0.0",
5151
"@angular/common": "^16.0.0",
@@ -55,7 +55,7 @@
5555
"@angular/platform-browser-dynamic": "^16.0.0",
5656
"@angular/router": "^16.0.0",
5757
"@schematics/angular": "^16.0.0",
58-
"firebase": "^9.0.0 || ^10.0.0",
58+
"firebase": "^10.0.0",
5959
"firebase-admin": "^9.11.1",
6060
"firebase-functions": "^3.6.0",
6161
"firebase-tools": "^12.2.1",
@@ -77,10 +77,10 @@
7777
},
7878
"devDependencies": {
7979
"@angular-devkit/build-angular": "^16.0.0",
80-
"@angular-eslint/builder": "^16.1.1",
81-
"@angular-eslint/eslint-plugin": "^16.1.1",
82-
"@angular-eslint/schematics": "16.0.3",
83-
"@angular/animations": "~16.0.0",
80+
"@angular-eslint/builder": "^16.0.0",
81+
"@angular-eslint/eslint-plugin": "^16.0.0",
82+
"@angular-eslint/schematics": "^16.0.0",
83+
"@angular/animations": "^16.0.0",
8484
"@angular/cli": "^16.0.0",
8585
"@angular/compiler-cli": "^16.0.0",
8686
"@angular/platform-server": "^16.0.0",
@@ -96,17 +96,12 @@
9696
"@types/winston": "^2.4.4",
9797
"@typescript-eslint/eslint-plugin": "^6.5.0",
9898
"@typescript-eslint/parser": "^6.5.0",
99-
"codelyzer": "^6.0.0",
100-
"concurrently": "^2.2.0",
10199
"conventional-changelog-cli": "^1.2.0",
102100
"cross-spawn": "^7.0.3",
103101
"eslint": "^8.48.0",
104102
"eslint-plugin-import": "^2.28.1",
105-
"file-loader": "^6.2.0",
106-
"firebase-functions-test": "^0.2.2",
107103
"globals": "^13.21.0",
108104
"globalthis": "^1.0.1",
109-
"gzip-size": "^5.1.1",
110105
"jasmine": "^5.0.0",
111106
"jasmine-core": "~5.0.0",
112107
"karma": "~6.4.0",
@@ -118,24 +113,16 @@
118113
"karma-safarinative-launcher": "^1.1.0",
119114
"ncp": "^2.0.0",
120115
"ng-packagr": "^16.0.0",
121-
"pretty-size": "^2.0.0",
122116
"protractor": "~7.0.0",
123117
"reflect-metadata": "^0.1.2",
124118
"replace-in-file": "^5.0.2",
125119
"rimraf": "^2.5.4",
126-
"rollup": "^2.22.0",
127120
"schematics-utilities": "^2.0.1",
128121
"shelljs": "^0.8.0",
129-
"systemjs": "^0.19.16",
130-
"systemjs-builder": "^0.15.7",
131-
"traceur": "0.0.96",
132122
"ts-transformer-keys": "^0.4.2",
133-
"tsconfig-paths": "^3.8.0",
134-
"tsickle": "^0.39.1",
135123
"tslint": "~6.1.0",
136124
"ttypescript": "^1.5.12",
137-
"typedoc": "^0.16.4",
138-
"typescript": "^5.0.0"
125+
"typescript": ">=4.9.3 <5.2"
139126
},
140127
"typings": "index.d.ts"
141128
}

src/firestore/firebase.ts

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
"author": "angular,firebase",
2424
"license": "MIT",
2525
"peerDependencies": {
26-
"@angular/common": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
27-
"@angular/core": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
28-
"@angular/platform-browser": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
29-
"@angular/platform-browser-dynamic": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
30-
"rxjs": "~6.6.0 || ^7.0.0",
31-
"firebase-tools": "^9.9.0 || ^10.0.0 || ^11.0.0 || ^12.0.0"
26+
"@angular/common": "^16.0.0",
27+
"@angular/core": "^16.0.0",
28+
"@angular/platform-browser": "^16.0.0",
29+
"@angular/platform-browser-dynamic": "^16.0.0",
30+
"rxjs": "^6.5.3 || ^7.4.0",
31+
"firebase-tools": "^12.0.0"
3232
},
3333
"peerDependenciesMeta": {
3434
"firebase-tools": { "optional": true }
3535
},
3636
"dependencies": {
37-
"firebase": "^9.8.0",
38-
"rxfire": "^6.0.0",
39-
"@angular-devkit/schematics": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
40-
"@schematics/angular": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0",
37+
"firebase": "^10.5.0",
38+
"rxfire": "^6.0.5",
39+
"@angular-devkit/schematics": "^16.0.0",
40+
"@schematics/angular": "^16.0.0",
4141
"tslib": "^2.0.0",
4242
"fuzzy": "^0.1.3",
4343
"inquirer-autocomplete-prompt": "^1.0.1",

tools/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ fi;
1616

1717
npm --no-git-tag-version --allow-same-version -f version $OVERRIDE_VERSION
1818

19-
yarn build &&
19+
npm run build &&
2020
echo "npm publish . --tag $NPM_TAG" > ./dist/packages-dist/publish.sh &&
2121
chmod +x ./dist/packages-dist/publish.sh

tools/build.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,15 @@ ${exportedZoneWrappedFns}
122122
}
123123

124124
const src = (...args: string[]) => join(process.cwd(), 'src', ...args);
125-
const dest = (...args: string[]) => join(process.cwd(), 'dist', '@angular/fire', ...args);
126-
const destPacakges = (...args: string[]) => join(process.cwd(), 'dist/packages-dist', ...args);
125+
const dest = (...args: string[]) => join(process.cwd(), 'dist', 'packages-dist', ...args);
127126

128127
const rootPackage = import(join(process.cwd(), 'package.json'));
129128

130129
async function replacePackageCoreVersion() {
131130
const root = await rootPackage;
132131
// eslint-disable-next-line @typescript-eslint/no-var-requires
133132
const replace = require('replace-in-file');
134-
const files = destPacakges('package.json');
133+
const files = dest('package.json');
135134
return replace({
136135
files,
137136
from: 'ANGULARFIRE2_VERSION',
@@ -141,7 +140,7 @@ async function replacePackageCoreVersion() {
141140

142141
async function replaceSchematicVersions() {
143142
const root = await rootPackage;
144-
const packagesPath = destPacakges('schematics', 'versions.json');
143+
const packagesPath = dest('schematics', 'versions.json');
145144
const dependencies = await import(packagesPath);
146145
Object.keys(dependencies.peerDependencies).forEach(name => {
147146
dependencies.peerDependencies[name].version = root.dependencies[name] || root.devDependencies[name];

0 commit comments

Comments
 (0)