chore: remove deps not compatible with Astro 2

This commit is contained in:
Ayo 2023-02-05 15:41:49 +01:00
parent dc72482582
commit ef9552adea
5 changed files with 838 additions and 4295 deletions

View file

@ -11,7 +11,7 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"astro": "^1.4.2" "astro": "^2.0.6"
}, },
"description": "``` npm create astro@latest -- --template minimal ```", "description": "``` npm create astro@latest -- --template minimal ```",
"main": "index.js", "main": "index.js",

5091
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -25,33 +25,26 @@
"scripts": { "scripts": {
"start": "npm run dev -w demo", "start": "npm run dev -w demo",
"dev": "npm run dev -w demo", "dev": "npm run dev -w demo",
"test": "mocha --parallel --timeout 15000",
"format": "prettier -w .", "format": "prettier -w .",
"lint": "eslint . --ext .ts,.js", "lint": "eslint . --ext .ts,.js",
"build": "tsc", "build": "tsc",
"demo": "npm run dev -w demo" "demo": "npm run dev -w demo"
}, },
"devDependencies": { "devDependencies": {
"@types/chai": "^4.3.3",
"@types/eslint": "^8.4.6", "@types/eslint": "^8.4.6",
"@types/mocha": "^9.1.1",
"@types/node": "^18.7.18", "@types/node": "^18.7.18",
"@types/prettier": "^2.7.0", "@types/prettier": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^5.37.0", "@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0", "@typescript-eslint/parser": "^5.37.0",
"astro": "^2.0.6",
"astro-component-tester": "^0.6.0",
"chai": "^4.3.6",
"eslint": "^8.23.1", "eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"mocha": "^10.0.0",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"prettier-plugin-astro": "^0.5.4", "prettier-plugin-astro": "^0.5.4",
"typescript": "^4.8.3" "typescript": "^4.8.3"
}, },
"peerDependencies": { "peerDependencies": {
"astro": "^1.0.0" "astro": "^2.0.6"
}, },
"license": "ISC", "license": "ISC",
"workspaces": [ "workspaces": [

View file

@ -1,7 +0,0 @@
# `test` directory
This folder contain tests for your component(s). This templates makes no assumption regarding your way of writting code. You can either write the code first and then the tests or the reverse (known as Test-Driven Development). Ultimately, what's important is that your code works and is tested to prove it!
Included in this template is [astro-component-tester](https://github.com/Princesseuh/astro-component-tester), a tool made to help you test the output of your component(s), check out its GitHub page for more info on how to use it
A commented example test (see `example.test.js`) is included in this folder to help you learn how to write a basic test for your project

View file

@ -1,24 +0,0 @@
import { expect } from 'chai';
import { getComponentOutput } from 'astro-component-tester';
describe('Example Tests', () => {
// Simple test to get us started with the syntax
it('should equal 2', () => {
expect(1 + 1).to.equal(2);
});
// This show us how to write a test for our component's output using astro-component-tester
describe('Component test', async () => {
let component;
// First get the component's output, this returns an object containing the generated html (`.html`)
before(async () => {
component = await getComponentOutput('./src/GithubStats.astro');
});
// Unless you modified /src/Component.astro, this should pass, as the component is empty apart from the frontmatter and new lines
it('example component should not be empty', () => {
expect(component.html).not.to.equal('\n');
});
});
});