isolate-package
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "isolate-package", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Isolate a monorepo package by bundling the build output with its shared workspace packages and lock file to form a self-contained directory.", | ||
@@ -5,0 +5,0 @@ "author": "Thijs Koerselman", |
@@ -78,3 +78,3 @@ # Isolate Package | ||
packages are matched based on their name. For example the following flavors all | ||
work: | ||
work (some depending on your package manager): | ||
@@ -85,6 +85,6 @@ ```cjson | ||
"dependencies": { | ||
"shared-package": "0.0.0" | ||
"shared-package": "*", | ||
"shared-package": "workspace:*", | ||
"shared-package": "*", | ||
"shared-package": "../shared-package", | ||
"shared-package": "^1.0.0" | ||
} | ||
@@ -94,5 +94,4 @@ } | ||
So basically, version information is ignored, and if the package name can be | ||
found in the list of local monorepo packages, it will be processed regardless of | ||
its version specifier. | ||
So if the a package name can be found as part of the workspace definition, it | ||
will be processed regardless of its version specifier. | ||
@@ -140,4 +139,5 @@ ### Define "files" and "version" in each manifest | ||
You can, however, declare multiple packages folders like `["packages/*", | ||
"apps/*"]`. It's just that the structure inside them should be flat. | ||
You can, however, declare multiple packages folders. I personally like to use | ||
`["packages/*", "apps/*", "services/*"]`. It's just that the structure inside | ||
them should be flat. | ||
@@ -179,4 +179,4 @@ ## Usage | ||
With this configuration you can then run `firebase deploy --only functions` from | ||
the package. | ||
With this configuration you can then run `npx firebase deploy --only functions` | ||
from the package. | ||
@@ -220,7 +220,8 @@ If you like to deploy to Firebase Functions from multiple packages you will also | ||
For most users no configuration should be required. You can configure the | ||
isolate process by placing a `isolate.config.json` file in the package that you | ||
want to isolate, except when you're [deploying to Firebase from the root of the | ||
workspace](#deploying-firebase-from-the-root). | ||
For most users no configuration should be necessary. | ||
You can configure the isolate process by placing a `isolate.config.json` file in | ||
the package that you want to isolate, except when you're [deploying to Firebase | ||
from the root of the workspace](#deploying-firebase-from-the-root). | ||
For the config file to be picked up, you will have to execute `isolate` from the | ||
@@ -248,2 +249,7 @@ same location, as it uses the current working directory. | ||
_Tip:_ If you can't use a lockfile I advise you to declare dependencies using | ||
absolute versions in your manifest files. This doesn't prevent their | ||
dependencies from installing newer versions, but at least you minimize the risk | ||
of things breaking. | ||
### includeDevDependencies | ||
@@ -307,6 +313,6 @@ | ||
The relative path to the root of the workspace / monorepo. In a typical | ||
repository you will have a `packages` and possibly an `apps` directory, and both | ||
contain packages, so any package you would want to isolate is located 2 levels | ||
up from the root. | ||
The relative path to the root of the workspace / monorepo. In a typical setup | ||
you will have a `packages` directory and possibly also an `apps` and a | ||
`services` directory, all of which contain packages. So any package you would | ||
want to isolate is located 2 levels up from the root. | ||
@@ -383,6 +389,6 @@ For example | ||
Personally I also use PNPM, and I don't see this as a big problem, because, like | ||
most of us, I declare versions with `^` in my manifest. This means that | ||
dependencies can only resolve to newer patch versions, but I am not using | ||
dependencies that are likely to break on patch version changes. | ||
_Tip:_ If you can't use a lockfile I advise you to declare dependencies using | ||
absolute versions in your manifest files. This doesn't prevent their | ||
dependencies from installing newer versions, but at least you minimize the risk | ||
of things breaking. | ||
@@ -389,0 +395,0 @@ ## Different Package Managers |
93545
407