[next] Upgrade compiler (#1619)
* [next] Upgrade compiler * Upgrade to latest compiler * Fix the path to global css * Removed debugger
This commit is contained in:
parent
5da14ca8ed
commit
dfe23864e0
19 changed files with 166 additions and 164 deletions
|
@ -18,7 +18,7 @@ const { title, description, image, type, next, prev, canonicalURL } = Astro.prop
|
||||||
<meta name="description" content={description}>
|
<meta name="description" content={description}>
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="/src/global.scss">
|
<link rel="stylesheet" href="/global.css">
|
||||||
<!-- Sitemap -->
|
<!-- Sitemap -->
|
||||||
<link rel="sitemap" href="/sitemap.xml">
|
<link rel="sitemap" href="/sitemap.xml">
|
||||||
<!-- RSS -->
|
<!-- RSS -->
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
"test": "mocha --parallel --timeout 15000"
|
"test": "mocha --parallel --timeout 15000"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/compiler": "^0.2.3",
|
"@astrojs/compiler": "^0.2.8",
|
||||||
"@astrojs/language-server": "^0.7.16",
|
"@astrojs/language-server": "^0.7.16",
|
||||||
"@astrojs/markdown-remark": "^0.3.1",
|
"@astrojs/markdown-remark": "^0.3.1",
|
||||||
"@astrojs/markdown-support": "0.3.1",
|
"@astrojs/markdown-support": "0.3.1",
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Attributes', async () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -9,7 +10,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Attributes', async () => {
|
|
||||||
it('Passes attributes to elements as expected', async () => {
|
it('Passes attributes to elements as expected', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Component children', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -12,7 +13,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Component children', () => {
|
|
||||||
it('Passes string children to framework components', async () => {
|
it('Passes string children to framework components', async () => {
|
||||||
const html = await fixture.readFile('/strings/index.html');
|
const html = await fixture.readFile('/strings/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Dynamic components', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -9,7 +10,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Dynamic components', () => {
|
|
||||||
it('Loads packages that only run code in client', async () => {
|
it('Loads packages that only run code in client', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Expressions', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -12,7 +13,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Expressions', () => {
|
|
||||||
it('Can load page', async () => {
|
it('Can load page', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Dynamic component fallback', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -12,7 +13,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Dynamic component fallback', () => {
|
|
||||||
it('Shows static content', async () => {
|
it('Shows static content', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('getStaticPaths()', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -14,7 +15,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('getStaticPaths()', () => {
|
|
||||||
it('is only called once during build', () => {
|
it('is only called once during build', () => {
|
||||||
// useless expect; if build() throws in setup then this test fails
|
// useless expect; if build() throws in setup then this test fails
|
||||||
expect(true).to.equal(true);
|
expect(true).to.equal(true);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Astro.*', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -15,7 +16,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Astro.*', () => {
|
|
||||||
it('Astro.request.url', async () => {
|
it('Astro.request.url', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('pageUrlFormat', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -13,7 +14,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('pageUrlFormat', () => {
|
|
||||||
it('outputs', async () => {
|
it('outputs', async () => {
|
||||||
expect(await fixture.readFile('/client/index.html')).to.be.ok;
|
expect(await fixture.readFile('/client/index.html')).to.be.ok;
|
||||||
expect(await fixture.readFile('/nested-md/index.html')).to.be.ok;
|
expect(await fixture.readFile('/nested-md/index.html')).to.be.ok;
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Pages', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -9,7 +10,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Pages', () => {
|
|
||||||
it('Can find page with "index" at the end file name', async () => {
|
it('Can find page with "index" at the end file name', async () => {
|
||||||
const html = await fixture.readFile('/posts/name-with-index/index.html');
|
const html = await fixture.readFile('/posts/name-with-index/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Public', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -8,7 +9,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Public', () => {
|
|
||||||
it('css and js files do not get bundled', async () => {
|
it('css and js files do not get bundled', async () => {
|
||||||
let indexHtml = await fixture.readFile('/index.html');
|
let indexHtml = await fixture.readFile('/index.html');
|
||||||
expect(indexHtml).to.include('<script src="/example.js"></script>');
|
expect(indexHtml).to.include('<script src="/example.js"></script>');
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Sitemaps', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -32,3 +33,4 @@ describe('Sitemap Generation', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Slots', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -9,7 +10,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Slots', () => {
|
|
||||||
it('Basic named slots work', async () => {
|
it('Basic named slots work', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { devCLI, loadFixture } from './test-utils.js';
|
import { devCLI, loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('config', () => {
|
||||||
let hostnameFixture;
|
let hostnameFixture;
|
||||||
let portFixture;
|
let portFixture;
|
||||||
|
|
||||||
|
@ -8,7 +9,6 @@ before(async () => {
|
||||||
[hostnameFixture, portFixture] = await Promise.all([loadFixture({ projectRoot: './fixtures/config-hostname/' }), loadFixture({ projectRoot: './fixtures/config-port/' })]);
|
[hostnameFixture, portFixture] = await Promise.all([loadFixture({ projectRoot: './fixtures/config-hostname/' }), loadFixture({ projectRoot: './fixtures/config-port/' })]);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('config', () => {
|
|
||||||
describe('hostname', () => {
|
describe('hostname', () => {
|
||||||
it('can be specified in astro.config.mjs', async () => {
|
it('can be specified in astro.config.mjs', async () => {
|
||||||
expect(hostnameFixture.config.devOptions.hostname).to.equal('0.0.0.0');
|
expect(hostnameFixture.config.devOptions.hostname).to.equal('0.0.0.0');
|
||||||
|
|
|
@ -3,6 +3,7 @@ import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
|
describe('Custom Elements', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -13,7 +14,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Custom Elements', () => {
|
|
||||||
it('Work as constructors', async () => {
|
it('Work as constructors', async () => {
|
||||||
const html = await fixture.readFile('/ctr/index.html');
|
const html = await fixture.readFile('/ctr/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Global Fetch', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -9,7 +10,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Global Fetch', () => {
|
|
||||||
it('Is available in Astro pages', async () => {
|
it('Is available in Astro pages', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
|
describe('Vue component', () => {
|
||||||
let fixture;
|
let fixture;
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
|
@ -9,7 +10,6 @@ before(async () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Vue component', () => {
|
|
||||||
it('Can load Vue', async () => {
|
it('Can load Vue', async () => {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
|
@ -106,10 +106,10 @@
|
||||||
"@algolia/logger-common" "4.10.5"
|
"@algolia/logger-common" "4.10.5"
|
||||||
"@algolia/requester-common" "4.10.5"
|
"@algolia/requester-common" "4.10.5"
|
||||||
|
|
||||||
"@astrojs/compiler@^0.2.3":
|
"@astrojs/compiler@^0.2.8":
|
||||||
version "0.2.3"
|
version "0.2.8"
|
||||||
resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-0.2.3.tgz#5e56444e999985f553de4a60e3838a918d4968e3"
|
resolved "https://registry.yarnpkg.com/@astrojs/compiler/-/compiler-0.2.8.tgz#73ab99cfcbf5e56500a60058594decf7db9d99d0"
|
||||||
integrity sha512-OBoiu3RxdpKPRV6ETJMWZH/EcxEtxswJA0iEqL490cMNkv9TqbOo0dc27jUVQz6CY6opIotZf+j9ajWUQJvX4g==
|
integrity sha512-RuvzJDhZZ5S3mPZhY0Y+4MBfTGqcs6Z9PpTviOy50Yb8GQ9wDaCqU3q95e9BH3p5j50xUpmyGMSOyuRFaFuCLw==
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript "^4.3.5"
|
typescript "^4.3.5"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue