Skip to content

Commit

Permalink
fix: missed rename of hostingSite to target, bump kit for types (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthegedus authored Oct 10, 2021
1 parent d000b98 commit cebf821
Show file tree
Hide file tree
Showing 7 changed files with 190 additions and 32 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ the Adapter and SvelteKit becoming incompatible. Here is a compatibility table:

| Adapter Version | SvelteKit Version |
| --------------- | -------------------- |
| `0.13.x` | `1.0.0-next.168` |
| `0.13.1` | `1.0.0-next.180` |
| `0.13.0` | `1.0.0-next.168` |
| `0.12.x` | `1.0.0-next.165` |
| `0.11.x` | `1.0.0-next.155` |
| `NA` | `1.0.0-next.152-154` |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"esbuild": "^0.12.28"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0-next.168"
"@sveltejs/kit": "^1.0.0-next.180"
},
"devDependencies": {
"@sveltejs/kit": "^1.0.0-next.168",
"@sveltejs/kit": "^1.0.0-next.180",
"@types/express": "^4.17.13",
"@types/node": "^14.17.15",
"ava": "^3.15.0",
Expand Down
202 changes: 178 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {BuildOptions} from 'esbuild';
type AdapterOptions = {
esbuildOptions?: (defaultOptions: BuildOptions) => Promise<BuildOptions> | BuildOptions;
firebaseJsonPath?: string;
hostingSite?: string;
target?: string;
sourceRewriteMatch?: string;
};

Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const entrypoint = function (options = {}) {
const {
esbuildOptions = undefined,
firebaseJsonPath = 'firebase.json',
hostingSite = undefined,
target = undefined,
sourceRewriteMatch = '**',
} = options;

utils.log.minor(`Adapter configuration:\n\t${JSON.stringify(options)}`);
const {functions, publicDir} = parseFirebaseConfiguration({firebaseJsonPath, hostingSite, sourceRewriteMatch});
const {functions, publicDir} = parseFirebaseConfiguration({firebaseJsonPath, target, sourceRewriteMatch});
ensureStaticResourceDirsDiffer({source: path.join(process.cwd(), config.kit.files.assets), dest: publicDir});

const functionsPackageJson = JSON.parse(readFileSync(path.join(functions.source, 'package.json'), 'utf-8'));
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/scaffold/firebase.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hosting": {
"public": "public",
"site": "svelte-func-single-site",
"target": "svelte-func-single-site",
"rewrites": [
{
"source": "**",
Expand Down
5 changes: 4 additions & 1 deletion tests/end-to-end/scaffold/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import firebase from 'svelte-adapter-firebase';
const config = {
kit: {
// Hydrate the <div id="svelte"> element in src/app.html
adapter: firebase(),
adapter: firebase({
target: 'svelte-func-single-site',
firebaseJsonPath: './firebase.json'
}),
target: '#svelte'
}
};
Expand Down

0 comments on commit cebf821

Please sign in to comment.