fyn 1.1.25 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -339
- package/dist/fyn.js +37 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
# fyn
|
|
1
|
+
# fyn
|
|
2
2
|
|
|
3
3
|
[![NPM version][npm-image]][npm-url]
|
|
4
4
|
[![Apache 2.0 License][apache-2.0-blue-image]][apache-2.0-url]
|
|
5
5
|
[![Build Status][build-image]][build-url]
|
|
6
6
|
[![Coverage Status][coveralls-image]][coveralls-url]
|
|
7
7
|
|
|
8
|
-
**fyn** is
|
|
8
|
+
**fyn** is the package manager for [fynpo], a zero setup monorepo manager for node.js.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
It treats your disk as a registry so you can develop, publish, and test all your packages using local copies directly.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- efficient disk space usage with [central storage](#central-storage)
|
|
14
|
-
- smaller `node_modules` with [guaranteed single copy of a package](#smaller-node_modules)
|
|
15
|
-
- flexible dependencies lock by using a [lock time stamp](#locking-dependencies-by-time)
|
|
16
|
-
- built-in support for a monorepo workspace
|
|
17
|
-
- and [more](#features)
|
|
18
|
-
|
|
19
|
-
![fyn demo][fyn-demo-gif]
|
|
20
|
-
|
|
21
|
-
## Quick Start <!-- omit in toc -->
|
|
12
|
+
## Quick Start
|
|
22
13
|
|
|
23
14
|
Interested in giving it a quick test? Just install and run it on your project:
|
|
24
15
|
|
|
@@ -43,243 +34,6 @@ fyn stat lodash
|
|
|
43
34
|
- It can read and use some settings from your `.npmrc`.
|
|
44
35
|
- It can use `npm-shrinkwrap.json` or `package-lock.json` files.
|
|
45
36
|
|
|
46
|
-
Want to find out more? Please read on below:
|
|
47
|
-
|
|
48
|
-
## Table Of Contents <!-- omit in toc -->
|
|
49
|
-
|
|
50
|
-
- [Features](#features)
|
|
51
|
-
- [Unique](#unique)
|
|
52
|
-
- [General](#general)
|
|
53
|
-
- [Overview](#overview)
|
|
54
|
-
- [Rationale](#rationale)
|
|
55
|
-
- [Enhanced `npm link`](#enhanced-npm-link)
|
|
56
|
-
- [`fynlocal` mode](#fynlocal-mode)
|
|
57
|
-
- [Smaller `node_modules`](#smaller-node_modules)
|
|
58
|
-
- [Easier Debugging `node_modules`](#easier-debugging-node_modules)
|
|
59
|
-
- [Using fyn](#using-fyn)
|
|
60
|
-
- [Installing `fyn`](#installing-fyn)
|
|
61
|
-
- [Installing Your Dependencies](#installing-your-dependencies)
|
|
62
|
-
- [Running npm scripts](#running-npm-scripts)
|
|
63
|
-
- [The `stat` command](#the-stat-command)
|
|
64
|
-
- [Locking Dependencies by Time](#locking-dependencies-by-time)
|
|
65
|
-
- [Refreshing Optional Dependencies](#refreshing-optional-dependencies)
|
|
66
|
-
- [Using with Lerna](#using-with-lerna)
|
|
67
|
-
- [Configuring fyn](#configuring-fyn)
|
|
68
|
-
- [Command Line Option to RC Mapping](#command-line-option-to-rc-mapping)
|
|
69
|
-
- [Other RC Options](#other-rc-options)
|
|
70
|
-
- [Scope registry](#scope-registry)
|
|
71
|
-
- [Central Storage](#central-storage)
|
|
72
|
-
- [Other Info](#other-info)
|
|
73
|
-
- [Compatibility](#compatibility)
|
|
74
|
-
- [Thank you `npm`](#thank-you-npm)
|
|
75
|
-
- [License](#license)
|
|
76
|
-
|
|
77
|
-
## Features
|
|
78
|
-
|
|
79
|
-
### Unique
|
|
80
|
-
|
|
81
|
-
- Focus on improving workflow and productivity.
|
|
82
|
-
- Very comprehensive and proper handling of `optionalDependencies`.
|
|
83
|
-
- A new `devOptDependencies` allows optional `devDependencies`.
|
|
84
|
-
- [Guaranteed single copy of a package](#flatten-nodemodules) => smaller `node_modules`.
|
|
85
|
-
- The best at installing and linking local packages - better [npm link].
|
|
86
|
-
- Install local packages like they are published (`fynlocal` mode)
|
|
87
|
-
- Works particularly well with [lerna] monorepos.
|
|
88
|
-
- Shows detailed stats of your dependencies.
|
|
89
|
-
- Efficient disk space usage with optional [central storage](#central-storage).
|
|
90
|
-
- Central storage mode is fast (and very fast on Linux) once cache is hot.
|
|
91
|
-
- Install dependencies with a time stamp lock.
|
|
92
|
-
|
|
93
|
-
### General
|
|
94
|
-
|
|
95
|
-
- A super fast node package manager for installing modules.
|
|
96
|
-
- Production quality with a lot of unit tests and verified on real applications.
|
|
97
|
-
- 100% compatible with Node.js and its ecosystem.
|
|
98
|
-
- A flat and simple dependency lock file that can be diffed and edited.
|
|
99
|
-
- Always deterministic `node_modules` installation.
|
|
100
|
-
- Compatible with [npm] by internally using the same modules as [npm].
|
|
101
|
-
- Maintains as much of [npm]'s behaviors as possible.
|
|
102
|
-
- Able to use [npm]'s `npm-shrinkwrap.json` or `package-lock.json`.
|
|
103
|
-
- built-in support for maintaining a monorepo workspace.
|
|
104
|
-
|
|
105
|
-
## Overview
|
|
106
|
-
|
|
107
|
-
`fyn` is the result of a long pursuit to make developing and managing large and complex software in Node.js easier. To realize that, it ultimately ends up being a node package manager.
|
|
108
|
-
|
|
109
|
-
It started out as small experiments for a single goal of better local package installing and linking, ie: better [npm link], but has gradually grown to a fully functional node package manager for the [flat node_modules design]. It is fast, production quality, and maintains [100% compatibility](#compatibility).
|
|
110
|
-
|
|
111
|
-
While it has all the bells and whistles to make it an extremely fast and efficient package manager, it's not just another [npm].
|
|
112
|
-
|
|
113
|
-
It comes with two unique features that are very useful when you are working on a large Node.js application that consists of many packages.
|
|
114
|
-
|
|
115
|
-
## Rationale
|
|
116
|
-
|
|
117
|
-
So why would you want to use this?
|
|
118
|
-
|
|
119
|
-
`fyn`'s `node_modules` structure is the smallest possible in size because there are no multiple copies of the exact same package installed.
|
|
120
|
-
|
|
121
|
-
It also has a special `fynlocal` mode that's a better [npm link] for handling local packages.
|
|
122
|
-
|
|
123
|
-
It's workspace aware and fits perfectly with the monorepo concept.
|
|
124
|
-
|
|
125
|
-
## Enhanced `npm link`
|
|
126
|
-
|
|
127
|
-
`fyn` has a `fynlocal` mode that's designed specifically to be a much better [npm link]. It effectively makes your disk a npm registry by treating packages on your local disk like they've been published. You can install and use them directly, and quickly test changes iteratively. It fits perfectly with the monorepo workspace concept. It would be very useful if you've ever done any of these:
|
|
128
|
-
|
|
129
|
-
- Debug your application by inspecting code inside `node_modules`.
|
|
130
|
-
- Live edit your package that's installed to `node_modules`, and then have to copy the changes out to commit.
|
|
131
|
-
- Use [lerna] to maintain and develop multiple packages. `fyn` works particularly well with a [lerna] repo.
|
|
132
|
-
- Or just have to juggle a lot of packages as part of your development.
|
|
133
|
-
|
|
134
|
-
### `fynlocal` mode
|
|
135
|
-
|
|
136
|
-
What is this? Think [npm link], but better. `fyn` subjects local packages to the same dependency resolution logic as those from the npm registry. Then you can test changes to any module locally as if they were published, which basically makes your disk a npm registry.
|
|
137
|
-
|
|
138
|
-
To enable, use the path to your local modules as semver in your package.json, or you can use the `fyn add` command.
|
|
139
|
-
|
|
140
|
-
For example:
|
|
141
|
-
|
|
142
|
-
```sh
|
|
143
|
-
fyn add ../my-awesome-module
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
That will install `my-awesome-module` into your node_modules. You can continue to develop and test `my-awesome-module` in its own directory and have the changes within existing files reflected in your app directly. Unlike `npm link`, your app resolves dependencies for `my-awesome-module` instead of relying on having them installed under `my-awesome-module/node_modules`.
|
|
147
|
-
|
|
148
|
-
If you add/remove files/directories in your local package, then running `fyn` install would take only seconds to update.
|
|
149
|
-
|
|
150
|
-
`fyn` will also save a file `package-fyn.json` with local dependencies in a section called `fyn`. You should not commit this file and `.gitignore` it. `fyn` will automatically check this file when installing, but you can turn off `fynlocal` mode with with the flag `--no-fynlocal` easily.
|
|
151
|
-
|
|
152
|
-
## Smaller `node_modules`
|
|
153
|
-
|
|
154
|
-
As a package manager, `fyn` employs a different approach that installs only one copy of every required versions of a package in a flat node_modules structure. Hence the name `fyn`, which stands for Flatten Your Node_modules.
|
|
155
|
-
|
|
156
|
-
It installs a copy of each version under the directory `node_modules/.f/_/<package_name>/<version>`. And it uses symlink to hoist a single version to `node_modules` for visibility. A package may have their own `node_modules` to resolve version differences.
|
|
157
|
-
|
|
158
|
-
This approach has the benefit of guaranteeing a single copy of a package installed and therefore slightly smaller size `node_modules`.
|
|
159
|
-
|
|
160
|
-
## Easier Debugging `node_modules`
|
|
161
|
-
|
|
162
|
-
With a guaranteed single copy of a package, it makes debugging easier when you have to reach into code under `node_modules`.
|
|
163
|
-
|
|
164
|
-
`node_modules` installed by [npm] could potentially have multiple copies of an identical package. So even if you've identified the module under `node_modules` to investigate your issue, you may still need to figure which copy.
|
|
165
|
-
|
|
166
|
-
With `fyn`'s flat `node_modules` design, there is only one copy of any version so it's easier for you to set your breakpoint.
|
|
167
|
-
|
|
168
|
-
## Using fyn
|
|
169
|
-
|
|
170
|
-
### Installing `fyn`
|
|
171
|
-
|
|
172
|
-
Please install `fyn` to your Node.js setup globally.
|
|
173
|
-
|
|
174
|
-
```sh
|
|
175
|
-
npm install -g fyn
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Installing Your Dependencies
|
|
179
|
-
|
|
180
|
-
Change into the directory for your project with the `package.json` file, and run:
|
|
181
|
-
|
|
182
|
-
```sh
|
|
183
|
-
fyn
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
- Which is a shorthand for `fyn install` since `install` is the default command.
|
|
187
|
-
|
|
188
|
-
Depending on the size of your dependencies and your network speed, this could take anywhere from a few seconds to a few minutes.
|
|
189
|
-
|
|
190
|
-
### Running npm scripts
|
|
191
|
-
|
|
192
|
-
As a convenience, `fyn` implements `npm run` by utilizing the same modules from [npm]. You can run your [npm scripts] in `package.json`. An alias command `fun` is available also:
|
|
193
|
-
|
|
194
|
-
- `test` - `fyn test` or `fun test`
|
|
195
|
-
- any script - `fyn run <script-name>` or `fun <script-name>`
|
|
196
|
-
- list scripts - `fyn run -l` or `fun -l`
|
|
197
|
-
|
|
198
|
-
### The `stat` command
|
|
199
|
-
|
|
200
|
-
If you have a lockfile, then `fyn` takes sub seconds to regenerate the entire dependency tree even on very large applications. This makes it very fast to probe what's installed.
|
|
201
|
-
|
|
202
|
-
It has a `stat` command that's very fast and can let you know all copies of a package installed and all others that depend on it.
|
|
203
|
-
|
|
204
|
-
For example:
|
|
205
|
-
|
|
206
|
-
```sh
|
|
207
|
-
> loaded lockfile
|
|
208
|
-
> done resolving dependencies 0.157secs
|
|
209
|
-
lodash matched these installed versions lodash@4.17.20
|
|
210
|
-
=> lodash@4.17.20 has 15 dependents: @babel/core@7.12.13 @babel/helper-module-transforms@7.12.13 @babel/traverse@7.12.13 @babel/types@7.12.13 @eslint/eslintrc@0.3.0 @xarc/module-dev@3.2.1 async@2.6.3 electrode-confippet@1.6.0 electrode-server@3.3.0 eslint@7.19.0 eslint-plugin-jsdoc@30.7.13 table@6.0.7 webpack-bundle-analyzer@3.9.0 ~package.json
|
|
211
|
-
=> lodash@4.17.20 has 258 dependency paths, showing the 18 most significant ones below:
|
|
212
|
-
> @babel/preset-env@7.12.13 > @babel/plugin-transform-modules-amd@7.12.13 > @babel/helper-module-transforms@7.12.13 > lodash@4.17.20
|
|
213
|
-
> @babel/preset-env@7.12.13 > @babel/plugin-transform-modules-commonjs@7.12.13 > @babel/helper-module-transforms@7.12.13 > lodash@4.17.20
|
|
214
|
-
> @babel/preset-env@7.12.13 > @babel/plugin-transform-modules-systemjs@7.12.13 > @babel/helper-module-transforms@7.12.13 > lodash@4.17.20
|
|
215
|
-
> @babel/preset-env@7.12.13 > @babel/plugin-transform-modules-umd@7.12.13 > @babel/helper-module-transforms@7.12.13 > lodash@4.17.20
|
|
216
|
-
> @babel/preset-env@7.12.13 > @babel/types@7.12.13 > lodash@4.17.20
|
|
217
|
-
> @xarc/module-dev@3.2.1 > lodash@4.17.20
|
|
218
|
-
> babel-eslint@10.1.0 > @babel/traverse@7.12.13 > lodash@4.17.20
|
|
219
|
-
> babel-eslint@10.1.0 > @babel/types@7.12.13 > lodash@4.17.20
|
|
220
|
-
> electrode-server@3.3.0 > async-eventemitter@0.2.4 > async@2.6.3 > lodash@4.17.20
|
|
221
|
-
> electrode-server@3.3.0 > electrode-confippet@1.6.0 > lodash@4.17.20
|
|
222
|
-
> electrode-server@3.3.0 > lodash@4.17.20
|
|
223
|
-
> eslint-plugin-jsdoc@30.7.13 > lodash@4.17.20
|
|
224
|
-
> eslint@7.19.0 > @eslint/eslintrc@0.3.0 > lodash@4.17.20
|
|
225
|
-
> eslint@7.19.0 > lodash@4.17.20
|
|
226
|
-
> eslint@7.19.0 > table@6.0.7 > lodash@4.17.20
|
|
227
|
-
> lodash@4.17.20
|
|
228
|
-
> nyc@15.1.0 > istanbul-lib-instrument@4.0.3 > @babel/core@7.12.13 > lodash@4.17.20
|
|
229
|
-
> webpack-bundle-analyzer@3.9.0 > lodash@4.17.20
|
|
230
|
-
> stat completed for lodash
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
#### Locking Dependencies by Time
|
|
234
|
-
|
|
235
|
-
Ever want to install your dependencies only consider packages published up to a certain date in the past? `fyn`'s got you covered with the `--lock-time` option.
|
|
236
|
-
|
|
237
|
-
- First rename or remove `fyn-lock.yaml` file.
|
|
238
|
-
- Then run install like this:
|
|
239
|
-
|
|
240
|
-
```sh
|
|
241
|
-
rm fyn-lock.yaml
|
|
242
|
-
fyn install --lock-time "12/01/2018"
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Or
|
|
246
|
-
|
|
247
|
-
```sh
|
|
248
|
-
fyn install --lock-time "dec 01, 2018"
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
And `fyn` will only consider packages published up to Dec 01, 2018 when installing.
|
|
252
|
-
|
|
253
|
-
### Refreshing Optional Dependencies
|
|
254
|
-
|
|
255
|
-
If you have any optional dependencies, then they will not be re-evaluated if you have a lock file.
|
|
256
|
-
|
|
257
|
-
You can re-evaluate optional dependencies with `--refresh-optionals` option:
|
|
258
|
-
|
|
259
|
-
```sh
|
|
260
|
-
fyn install --refresh-optionals
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
#### Using with Lerna
|
|
264
|
-
|
|
265
|
-
[lerna] actually implements its own internal `npm link` like feature to support a monorepo with packages that depend on each other.
|
|
266
|
-
|
|
267
|
-
`fyn` works particularly well with a [lerna] monorepo, but since it offers an enhanced `npm link`, it replaces [lerna]'s bootstrap feature.
|
|
268
|
-
|
|
269
|
-
To bootstrap a [lerna] repo with `fyn`'s enhanced `npm link`, please use the module [fynpo].
|
|
270
|
-
|
|
271
|
-
`fyn` also has a [central storage](#central-storage) option that would saves you a lot of disk space when working with [lerna] repos.
|
|
272
|
-
|
|
273
|
-
You can use [fynpo]'s `local` command to update and commit your monorepo's packages' `package.json`, and you can run `fyn` to install and update their dependencies without having to do it through bootstrap.
|
|
274
|
-
|
|
275
|
-
For example:
|
|
276
|
-
|
|
277
|
-
```sh
|
|
278
|
-
fynpo local
|
|
279
|
-
cd packages/my-awesome-package
|
|
280
|
-
fyn
|
|
281
|
-
```
|
|
282
|
-
|
|
283
37
|
## Configuring fyn
|
|
284
38
|
|
|
285
39
|
fyn options can be listed in help:
|
|
@@ -323,95 +77,6 @@ production=false
|
|
|
323
77
|
centralStore=false
|
|
324
78
|
```
|
|
325
79
|
|
|
326
|
-
### Command Line Option to RC Mapping
|
|
327
|
-
|
|
328
|
-
> Any command line option can be converted to an option in the RC file by changing the name to camelCase form.
|
|
329
|
-
|
|
330
|
-
If there's no RC file or command line override, then these defaults are used:
|
|
331
|
-
|
|
332
|
-
- `registry` - `https://registry.npmjs.org`
|
|
333
|
-
- `progress` - `normal`
|
|
334
|
-
- `logLevel` - `info`
|
|
335
|
-
|
|
336
|
-
### Other RC Options
|
|
337
|
-
|
|
338
|
-
#### Scope registry
|
|
339
|
-
|
|
340
|
-
Scope registry can be specified in the RC files, the same as `.npmrc`.
|
|
341
|
-
|
|
342
|
-
For example, in Yaml format:
|
|
343
|
-
|
|
344
|
-
```yml
|
|
345
|
-
---
|
|
346
|
-
"@scope:registry": https://registry.custom.com
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
In ini format:
|
|
350
|
-
|
|
351
|
-
```ini
|
|
352
|
-
@scope:registry=https://registry.custom.com
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
### Central Storage
|
|
356
|
-
|
|
357
|
-
Inspired by [pnpm], `fyn` supports storing a single copy of all packages at a central location, and use hardlinks to install them into your `node_modules`.
|
|
358
|
-
|
|
359
|
-
The main advantage of this is to save disk space and slightly faster install if the storage is primed.
|
|
360
|
-
|
|
361
|
-
However, this feature is not enabled by default due to the following drawbacks:
|
|
362
|
-
|
|
363
|
-
1. Creating hardlinks actually could take a lot more than trivial time.
|
|
364
|
-
|
|
365
|
-
- What this means is the first time you install with `fyn`, when nothing is cached in the storage, central store mode will actually take noticeably more time, but subsequent installs could be faster.
|
|
366
|
-
|
|
367
|
-
- In particular, very bad on MacOS (High Sierra). For example, using hardlinks to replicate the module `nyc` actually takes longer than untaring the tgz file. It improves somewhat with concurrency, but still significant.
|
|
368
|
-
|
|
369
|
-
- On Linux with ext4 hardlinking appears to be more than 10 times more efficient than MacOS.
|
|
370
|
-
|
|
371
|
-
2. You can't do your debugging and development by modifying code that's installed into `node_modules` directly.
|
|
372
|
-
|
|
373
|
-
- Reason being that any change you make will affect the central copy, and therefore any other `node_modules` that's linked to it.
|
|
374
|
-
|
|
375
|
-
- If you do this, then even after you blow away your `node_modules` and reinstall it, your "debugging" changes will be there again.
|
|
376
|
-
|
|
377
|
-
- I imagine that this is actually a fairly big drawback for a lot of people.
|
|
378
|
-
|
|
379
|
-
- However, the primary design goal of `fyn` is to make your module development easier with its local linking install feature. You should use that to develop and debug multiple modules locally.
|
|
380
|
-
|
|
381
|
-
3. Similar to 2, but if any package has `postinstall` script that modifies its own files, then those modifications would affect all installations.
|
|
382
|
-
|
|
383
|
-
- There should not be a lot of packages like this, but if you happen to use one, it's unlikely a central storage would work.
|
|
384
|
-
|
|
385
|
-
In general if disk space is not an issue for you, then it's better to avoid this and the issues that will likely creep up on you when you least expect it.
|
|
386
|
-
|
|
387
|
-
If you do have a use of this feature despite the drawbacks, then you can enable it with the `--central-store` CLI option.
|
|
388
|
-
|
|
389
|
-
The recommendation is to add the following to `.fynrc` because then you don't have to remember to specify the option in the CLI every time.
|
|
390
|
-
|
|
391
|
-
```ini
|
|
392
|
-
centralStore=true
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
You can also set the env variable `FYN_CENTRAL_DIR` to `1` to enable it.
|
|
396
|
-
If you set it to point to a directory then it will be used as the central store directory.
|
|
397
|
-
|
|
398
|
-
And to work around the issues, `fyn` does the following:
|
|
399
|
-
|
|
400
|
-
- issue 2: `fyn` has a `--copy` option that allows you to force any package to install with copying instead of hardlinking.
|
|
401
|
-
- issue 3: `fyn` will not hard link packages from central store if they have `preinstall`, `install`, or `postinstall` npm scripts.
|
|
402
|
-
|
|
403
|
-
## Other Info
|
|
404
|
-
|
|
405
|
-
### Compatibility
|
|
406
|
-
|
|
407
|
-
- `fyn`'s top level `node_modules` is 100% compatible with Node.js and 3rd party tools and modules. No special updates or changes needed.
|
|
408
|
-
|
|
409
|
-
- `fyn` uses npm's [pacote] to do data retrieval. That means its package data handling is the same as npm and it can use npm's cache directly.
|
|
410
|
-
|
|
411
|
-
* `fyn` will take [npm]'s `npm-shrinkwrap.json` or `package-lock.json` if its own `fyn-lock.yaml` file doesn't exist, but will save `fyn-lock.yaml` after.
|
|
412
|
-
|
|
413
|
-
* `fyn` has an asynchronous and concurrent dependency resolution engine that is 100% compatible with node's nesting design, and properly handles `optionalDependencies`.
|
|
414
|
-
|
|
415
80
|
### Thank you `npm`
|
|
416
81
|
|
|
417
82
|
Node Package Manager is a very large and complex piece of software. Developing `fyn` was 10 times easier because of the generous open source software from the community, especially the individual packages that are part of `npm`.
|
|
@@ -466,3 +131,4 @@ Licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses
|
|
|
466
131
|
[npmlog]: https://www.npmjs.com/package/npmlog
|
|
467
132
|
[build-image]: https://github.com/jchip/fynpo/actions/workflows/ci.yml/badge.svg
|
|
468
133
|
[build-url]: https://github.com/jchip/fynpo/actions/workflows/ci.yml
|
|
134
|
+
[fynpo]: https://github.com/jchip/fynpo
|
package/dist/fyn.js
CHANGED
|
@@ -5753,7 +5753,7 @@ const {
|
|
|
5753
5753
|
const {
|
|
5754
5754
|
getDepSection,
|
|
5755
5755
|
makeDepStep
|
|
5756
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
5756
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/index.js");
|
|
5757
5757
|
|
|
5758
5758
|
const xaa = __webpack_require__("./lib/util/xaa.js");
|
|
5759
5759
|
|
|
@@ -8723,7 +8723,7 @@ const {
|
|
|
8723
8723
|
|
|
8724
8724
|
const {
|
|
8725
8725
|
PackageRef
|
|
8726
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
8726
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/index.js");
|
|
8727
8727
|
|
|
8728
8728
|
const WATCH_TIME = 5000; // consider meta cache stale after this much time (30 minutes)
|
|
8729
8729
|
|
|
@@ -9739,7 +9739,7 @@ const {
|
|
|
9739
9739
|
const {
|
|
9740
9740
|
FynpoConfigManager,
|
|
9741
9741
|
FynpoDepGraph
|
|
9742
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
9742
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/index.js");
|
|
9743
9743
|
/* eslint-disable no-magic-numbers, max-statements, no-empty, complexity, no-eval */
|
|
9744
9744
|
|
|
9745
9745
|
|
|
@@ -11237,7 +11237,7 @@ module.exports = __webpack_require__("./node_modules/.f/_/xaa/1.7.0/xaa/dist/xaa
|
|
|
11237
11237
|
|
|
11238
11238
|
/***/ }),
|
|
11239
11239
|
|
|
11240
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
11240
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/caching.js":
|
|
11241
11241
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11242
11242
|
|
|
11243
11243
|
"use strict";
|
|
@@ -11258,27 +11258,36 @@ const fs_1 = (0, tslib_1.__importDefault)(__webpack_require__("fs"));
|
|
|
11258
11258
|
const path_1 = (0, tslib_1.__importDefault)(__webpack_require__("path"));
|
|
11259
11259
|
const crypto_1 = (0, tslib_1.__importDefault)(__webpack_require__("crypto"));
|
|
11260
11260
|
/**
|
|
11261
|
-
*
|
|
11261
|
+
* create a sha256 hash for some data
|
|
11262
11262
|
*
|
|
11263
|
-
* @param
|
|
11263
|
+
* @param data
|
|
11264
11264
|
* @returns
|
|
11265
11265
|
*/
|
|
11266
11266
|
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11267
|
+
function hashData1(data, encoding = "base64url") {
|
|
11268
|
+
return crypto_1.default.createHash("sha256").update(data).digest(encoding);
|
|
11269
|
+
}
|
|
11270
|
+
|
|
11271
|
+
function hashData2(data, encoding = "base64url") {
|
|
11272
|
+
if (encoding === "base64url") {
|
|
11273
|
+
return hashData1(data, "base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
11274
|
+
}
|
|
11275
|
+
|
|
11276
|
+
return hashData1(data, encoding);
|
|
11271
11277
|
}
|
|
11278
|
+
|
|
11279
|
+
const hashData = typeof crypto_1.default.createHash("sha256").digest("base64url") === "string" ? hashData1 : hashData2;
|
|
11272
11280
|
/**
|
|
11273
|
-
*
|
|
11281
|
+
* generate sha256 has of a file
|
|
11274
11282
|
*
|
|
11275
|
-
* @param
|
|
11283
|
+
* @param filename
|
|
11276
11284
|
* @returns
|
|
11277
11285
|
*/
|
|
11278
11286
|
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11287
|
+
async function hashFile(filename, encoding = "base64url") {
|
|
11288
|
+
const data = await fs_1.default.promises.readFile(filename);
|
|
11289
|
+
const hash = hashData(data, encoding);
|
|
11290
|
+
return hash;
|
|
11282
11291
|
}
|
|
11283
11292
|
/**
|
|
11284
11293
|
* generate hash for an array of files
|
|
@@ -11381,7 +11390,7 @@ async function processInput({
|
|
|
11381
11390
|
versions: lodash_1.default.pick(process.versions, input.includeVersions),
|
|
11382
11391
|
npmScripts: lodash_1.default.pick(lodash_1.default.get(packageJson || (await readPackageJson(cwd)), "scripts"), input.npmScripts),
|
|
11383
11392
|
fileHashes,
|
|
11384
|
-
extra: extra ||
|
|
11393
|
+
extra: extra || {} // additional data
|
|
11385
11394
|
|
|
11386
11395
|
};
|
|
11387
11396
|
const hash = hashData(JSON.stringify(data));
|
|
@@ -11478,7 +11487,7 @@ exports.processOutput = processOutput;
|
|
|
11478
11487
|
|
|
11479
11488
|
/***/ }),
|
|
11480
11489
|
|
|
11481
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
11490
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/fynpo-config.js":
|
|
11482
11491
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11483
11492
|
|
|
11484
11493
|
"use strict";
|
|
@@ -11628,7 +11637,7 @@ exports.FynpoConfigManager = FynpoConfigManager;
|
|
|
11628
11637
|
|
|
11629
11638
|
/***/ }),
|
|
11630
11639
|
|
|
11631
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
11640
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js":
|
|
11632
11641
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11633
11642
|
|
|
11634
11643
|
"use strict";
|
|
@@ -11658,9 +11667,9 @@ const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_mod
|
|
|
11658
11667
|
const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
|
|
11659
11668
|
const semver_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/semver/7.3.5/semver/index.js"));
|
|
11660
11669
|
|
|
11661
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
11670
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
11662
11671
|
|
|
11663
|
-
const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
11672
|
+
const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/util.js");
|
|
11664
11673
|
|
|
11665
11674
|
const is_path_inside_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/is-path-inside/3.0.3/is-path-inside/index.js"));
|
|
11666
11675
|
const DepSectionMap = {
|
|
@@ -12381,7 +12390,7 @@ exports.FynpoDepGraph = FynpoDepGraph;
|
|
|
12381
12390
|
|
|
12382
12391
|
/***/ }),
|
|
12383
12392
|
|
|
12384
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
12393
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/index.js":
|
|
12385
12394
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12386
12395
|
|
|
12387
12396
|
"use strict";
|
|
@@ -12403,12 +12412,12 @@ const filter_scan_dir_1 = __webpack_require__("./node_modules/.f/_/filter-scan-d
|
|
|
12403
12412
|
const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
|
|
12404
12413
|
const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
|
|
12405
12414
|
|
|
12406
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12415
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
12407
12416
|
|
|
12408
|
-
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12409
|
-
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12410
|
-
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12411
|
-
exports.caching = (0, tslib_1.__importStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12417
|
+
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js"), exports);
|
|
12418
|
+
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/fynpo-config.js"), exports);
|
|
12419
|
+
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/util.js"), exports);
|
|
12420
|
+
exports.caching = (0, tslib_1.__importStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/caching.js"));
|
|
12412
12421
|
/**
|
|
12413
12422
|
* Take an array of packages and figure out their dependencies on each other
|
|
12414
12423
|
*
|
|
@@ -12664,7 +12673,7 @@ exports.makePkgDeps = makePkgDeps;
|
|
|
12664
12673
|
|
|
12665
12674
|
/***/ }),
|
|
12666
12675
|
|
|
12667
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
12676
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/minimatch-group.js":
|
|
12668
12677
|
/***/ ((__unused_webpack_module, exports) => {
|
|
12669
12678
|
|
|
12670
12679
|
"use strict";
|
|
@@ -12710,7 +12719,7 @@ exports.groupMM = groupMM;
|
|
|
12710
12719
|
|
|
12711
12720
|
/***/ }),
|
|
12712
12721
|
|
|
12713
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
12722
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/util.js":
|
|
12714
12723
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12715
12724
|
|
|
12716
12725
|
"use strict";
|