Skip to content

Commit

Permalink
merge master -> gh-349
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Feb 1, 2021
2 parents 1d4b1ec + 6b7ad47 commit f156c78
Show file tree
Hide file tree
Showing 42 changed files with 1,879 additions and 770 deletions.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"smart-pears-accept",
"smooth-rockets-sneeze",
"spicy-kings-perform",
"stale-plums-heal",
"strange-poems-design",
"tame-forks-happen",
"tasty-donkeys-wait",
Expand Down
7 changes: 7 additions & 0 deletions .changeset/stale-plums-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'create-svelte': patch
'@sveltejs/kit': patch
'@sveltejs/snowpack-config': patch
---

Rename _.config.js to _.config.cjs
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
},
"settings": {
"import/ignore": "/template/"

},
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ pnpm build
```

You should now be able to run the [examples](examples) by navigating to one of the directories and doing `pnpm dev`.

## Testing

Run `pnpm test` to run the tests from all subpackages. Browser tests live in subpackages of `test/` such as `test/apps/basics/`. To run a single test, open up the file and change `test` to `test.only` for the relevant test.
2 changes: 1 addition & 1 deletion examples/hn.svelte.dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@sveltejs/adapter-netlify": "workspace:*",
"@sveltejs/kit": "workspace:*",
"@sveltejs/snowpack-config": "workspace:*",
"svelte": "^3.29.0"
"svelte": "^3.32.1"
}
}
File renamed without changes.
File renamed without changes.
14 changes: 6 additions & 8 deletions examples/realworld.svelte.dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ npm init svelte@next my-app

> Note: the `@next` is temporary

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
Expand All @@ -28,14 +27,13 @@ npm run dev
npm run dev -- --open
```


## Building

Svelte apps are built with *adapters*, which optimise your project for deployment to different environments, like [Begin](https://begin.com), [Netlify](https://www.netlify.com), [Vercel](https://vercel.com) and so on. (You can also create your own adapter — instructions TODO.)
Svelte apps are built with _adapters_, which optimise your project for deployment to different environments, like [Begin](https://begin.com), [Netlify](https://www.netlify.com), [Vercel](https://vercel.com) and so on. (You can also create your own adapter — instructions TODO.)

By default, `npm run build` will generate a Node app that you can run with `node build`. To use a different adapter, install it and update your `svelte.config.js` accordingly. The following official adapters are available:
By default, `npm run build` will generate a Node app that you can run with `node build`. To use a different adapter, install it and update your `svelte.config.cjs` accordingly. The following official adapters are available:

* [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/master/packages/adapter-node)
* [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static)
* [@sveltejs/adapter-netlify](https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify)
* ...more soon
- [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/master/packages/adapter-node)
- [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static)
- [@sveltejs/adapter-netlify](https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify)
- ...more soon
4 changes: 2 additions & 2 deletions examples/realworld.svelte.dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"@sveltejs/adapter-node": "workspace:*",
"@sveltejs/kit": "workspace:*",
"@sveltejs/snowpack-config": "workspace:*",
"marked": "^1.2.2",
"svelte": "^3.29.0"
"marked": "^1.2.8",
"svelte": "^3.32.1"
},
"dependencies": {
"node-fetch": "^2.6.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"@sveltejs/adapter-node": "workspace:*",
"@sveltejs/kit": "workspace:*",
"@sveltejs/snowpack-config": "workspace:*",
"svelte": "^3.29.0"
"svelte": "^3.32.1"
}
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/svelte-kit-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Place to try out [@sveltejs/app](https://github.com/sveltejs/kit). Very basic and incomplete, many things haven't yet been thought through.

To start the app in development mode do `npm run dev`. To build, use `npm run build`. This will use whichever adapter is specified in `svelte.config.js`, which will also need to be installed (or linked).
To start the app in development mode do `npm run dev`. To build, use `npm run build`. This will use whichever adapter is specified in `svelte.config.cjs`, which will also need to be installed (or linked).
2 changes: 1 addition & 1 deletion examples/svelte-kit-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"@sveltejs/adapter-static": "workspace:*",
"@sveltejs/kit": "workspace:*",
"@sveltejs/snowpack-config": "workspace:*",
"svelte": "^3.29.0"
"svelte": "^3.32.1"
}
}
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@
},
"homepage": "https://github.com/sveltejs/kit#readme",
"devDependencies": {
"@changesets/cli": "^2.11.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@changesets/cli": "^2.14.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-node-resolve": "^11.1.1",
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.6.0",
"@typescript-eslint/eslint-plugin": "^4.8.2",
"@typescript-eslint/parser": "^4.8.2",
"eslint": "^7.11.0",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-svelte3": "^2.7.3",
"playwright": "^1.6.2",
"prettier": "2.1.2",
"rollup": "^2.32.0",
"typescript": "^4.1.2"
"eslint-plugin-svelte3": "^3.0.0",
"playwright": "^1.8.0",
"prettier": "2.2.1",
"rollup": "^2.38.3",
"typescript": "^4.1.3"
},
"type": "module"
}
4 changes: 2 additions & 2 deletions packages/adapter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@sveltejs/app-utils": "workspace:*",
"rollup": "^2.32.0",
"sirv": "^1.0.7"
"rollup": "^2.38.3",
"sirv": "^1.0.11"
}
}
4 changes: 2 additions & 2 deletions packages/adapter-vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@sveltejs/app-utils": "workspace:*"
},
"devDependencies": {
"rollup": "^2.32.0",
"sirv": "^1.0.7"
"rollup": "^2.38.3",
"sirv": "^1.0.11"
}
}
11 changes: 5 additions & 6 deletions packages/app-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@
"test": "uvu"
},
"dependencies": {
"mime": "^2.4.6"
"mime": "^2.5.0"
},
"devDependencies": {
"@types/mime": "^2.0.3",
"@types/node": "^14.14.0",
"@types/node-fetch": "^2.5.7",
"@types/node": "^14.14.22",
"@types/node-fetch": "^2.5.8",
"devalue": "^2.0.1",
"node-fetch": "^2.6.1",
"rollup": "^2.32.0",
"svelte": "^3.29.0",
"uvu": "^0.5.1"
"rollup": "^2.38.3",
"svelte": "^3.32.1"
},
"type": "module",
"exports": {
Expand Down
6 changes: 6 additions & 0 deletions packages/create-svelte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# create-svelte

## 2.0.0-next.26

### Patch Changes

- 00cbaf6: Rename _.config.js to _.config.cjs

## 2.0.0-next.25

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/create-svelte/cli/modifications/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function update_component(cwd, filepath, replacements) {
}

/**
* Adds `svelte-preprocess` to `svelte.config.js`, if there's no preprocessor already.
* Adds `svelte-preprocess` to `svelte.config.cjs`, if there's no preprocessor already.
*/
export function add_svelte_prepocess_to_config(cwd) {
const file = path.join(cwd, 'svelte.config.cjs');
Expand All @@ -44,9 +44,9 @@ export function add_svelte_prepocess_to_config(cwd) {
config = config.replace(
'module.exports = {',
`module.exports = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: sveltePreprocess(),`
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: sveltePreprocess(),`
);

fs.writeFileSync(file, config);
Expand Down
8 changes: 4 additions & 4 deletions packages/create-svelte/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-svelte",
"version": "2.0.0-next.25",
"version": "2.0.0-next.26",
"bin": "./bin",
"devDependencies": {
"@rollup/plugin-json": "^4.1.0",
Expand All @@ -9,9 +9,9 @@
"@sveltejs/kit": "workspace:*",
"@sveltejs/snowpack-config": "workspace:*",
"gitignore-parser": "^0.0.2",
"kleur": "^4.1.3",
"prompts": "^2.3.2",
"rollup": "^2.32.0",
"kleur": "^4.1.4",
"prompts": "^2.4.0",
"rollup": "^2.38.3",
"tiny-glob": "^0.2.8"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-svelte/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm run dev -- --open

Svelte apps are built with _adapters_, which optimise your project for deployment to different environments, like [Begin](https://begin.com), [Netlify](https://www.netlify.com), [Vercel](https://vercel.com) and so on. (You can also create your own adapter — instructions TODO.)

By default, `npm run build` will generate a Node app that you can run with `node build`. To use a different adapter, install it and update your `svelte.config.js` accordingly. The following official adapters are available:
By default, `npm run build` will generate a Node app that you can run with `node build`. To use a different adapter, install it and update your `svelte.config.cjs` accordingly. The following official adapters are available:

- [@sveltejs/adapter-node](https://github.com/sveltejs/kit/tree/master/packages/adapter-node)
- [@sveltejs/adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static)
Expand Down
3 changes: 2 additions & 1 deletion packages/create-svelte/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"@sveltejs/kit": "workspace:*",
"@sveltejs/snowpack-config": "workspace:*",
"svelte": "^3.29.0"
}
},
"type": "module"
}
6 changes: 6 additions & 0 deletions packages/kit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @sveltejs/kit

## 1.0.0-next.30

### Patch Changes

- 00cbaf6: Rename _.config.js to _.config.cjs

## 1.0.0-next.29

### Patch Changes
Expand Down
29 changes: 14 additions & 15 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
{
"name": "@sveltejs/kit",
"version": "1.0.0-next.29",
"version": "1.0.0-next.30",
"type": "module",
"dependencies": {
"cheap-watch": "^1.0.2",
"cheap-watch": "^1.0.3",
"http-proxy": "^1.18.1",
"rollup": "^2.32.0",
"rollup": "^2.38.3",
"rollup-plugin-css-chunks": "^2.0.2",
"rollup-plugin-terser": "^7.0.2",
"sade": "^1.7.4",
"scorta": "^1.0.0",
"snowpack": "^3.0.10",
"snowpack": "^3.0.11",
"source-map": "^0.7.3"
},
"devDependencies": {
"@sveltejs/app-utils": "*",
"@types/node": "^14.11.10",
"@sveltejs/app-utils": "workspace:*",
"@types/node": "^14.14.22",
"@types/rimraf": "^3.0.0",
"@types/sade": "^1.7.2",
"amphtml-validator": "^1.0.34",
"eslint": "^7.14.0",
"estree-walker": "^3.0.0",
"eslint": "^7.19.0",
"estree-walker": "^2.0.2",
"is-reference": "^1.2.1",
"kleur": "^4.1.3",
"kleur": "^4.1.4",
"magic-string": "^0.25.7",
"meriyah": "^3.0.3",
"meriyah": "^3.1.6",
"node-fetch": "^2.6.1",
"periscopic": "^3.0.0",
"port-authority": "^1.1.1",
"port-authority": "^1.1.2",
"require-relative": "^0.8.7",
"rimraf": "^3.0.2",
"sirv": "^1.0.7",
"sirv": "^1.0.11",
"source-map-support": "^0.5.19",
"svelte": "^3.29.0",
"tiny-glob": "^0.2.8",
"uvu": "^0.5.1"
"svelte": "^3.32.1",
"tiny-glob": "^0.2.8"
},
"bin": {
"svelte-kit": "svelte-kit"
Expand Down
Loading

0 comments on commit f156c78

Please sign in to comment.