Skip to content

Commit

Permalink
update deps: esbuild, typescript (#2750)
Browse files Browse the repository at this point in the history
* update dep: typescript

* update dep: esbuild

* update types

* update types

* update dep: es-module-lexer

* update tests
  • Loading branch information
FredKSchott authored Mar 10, 2022
1 parent 52d812b commit 79fc320
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 249 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-humans-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

update [email protected]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"del": "^6.0.0",
"esbuild": "0.13.7",
"esbuild": "0.14.25",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
Expand All @@ -67,6 +67,6 @@
"pretty-bytes": "^6.0.0",
"tiny-glob": "^0.2.9",
"turbo": "^1.1.5",
"typescript": "4.5.2"
"typescript": "~4.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/astro-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dev": "astro-scripts dev \"src/**/*.ts\""
},
"dependencies": {
"@types/node": "^15.12.2",
"@types/node": "^14.0.0",
"acorn": "^8.6.0",
"locate-character": "^2.0.5",
"magic-string": "^0.25.3"
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
"common-ancestor-path": "^1.0.1",
"debug": "^4.3.3",
"eol": "^0.9.1",
"es-module-lexer": "^0.9.3",
"esbuild": "0.13.7",
"es-module-lexer": "^0.10.0",
"esbuild": "0.14.25",
"estree-walker": "^3.0.0",
"fast-glob": "^3.2.7",
"fast-xml-parser": "^4.0.0-beta.3",
Expand Down Expand Up @@ -119,14 +119,14 @@
"@types/common-ancestor-path": "^1.0.0",
"@types/connect": "^3.4.35",
"@types/debug": "^4.1.7",
"@types/estree": "^0.0.50",
"@types/estree": "^0.0.51",
"@types/mime": "^2.0.3",
"@types/mocha": "^9.0.0",
"@types/parse5": "^6.0.3",
"@types/resolve": "^1.20.1",
"@types/rimraf": "^3.0.2",
"@types/send": "^0.17.1",
"@types/yargs-parser": "^20.2.1",
"@types/yargs-parser": "^21.0.0",
"astro-scripts": "workspace:*",
"chai": "^4.3.4",
"cheerio": "^1.0.0-rc.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function resolveCommand(flags: Arguments): CLICommand {
} else if (flags.help) {
return 'help';
}
const cmd = flags._[2];
const cmd = flags._[2] as string;
const supportedCommands = new Set(['dev', 'build', 'preview', 'check']);
if (supportedCommands.has(cmd)) {
return cmd as 'dev' | 'build' | 'preview' | 'check';
Expand Down
12 changes: 5 additions & 7 deletions packages/astro/test/0-css.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ describe('CSS', function () {
describe('JSX', () => {
it('.css', async () => {
const el = $('#react-css');

// 1. check HTML
expect(el.attr('class')).to.include('react-title');

// 2. check CSS
expect(bundledCSS).to.include('.react-title{');
expect(bundledCSS).to.include('.react-title');
});

it('.module.css', async () => {
Expand Down Expand Up @@ -196,7 +194,7 @@ describe('CSS', function () {
expect(el.attr('class')).to.include(moduleClass);

// 2. check CSS
expect(bundledCSS).to.include(`${moduleClass}{`);
expect(bundledCSS).to.match(new RegExp(`.${moduleClass}[^{]*{font-family:cursive}`));
});

it('<style lang="sass">', async () => {
Expand Down Expand Up @@ -230,7 +228,7 @@ describe('CSS', function () {
expect(el.attr('class')).to.include('svelte-css');

// 2. check CSS
expect(bundledCSS).to.match(new RegExp(`.svelte-css.${scopedClass}[^{]*{font-family:"Comic Sans MS"`));
expect(bundledCSS).to.match(new RegExp(`.svelte-css.${scopedClass}[^{]*{font-family:Comic Sans MS`));
});

it('<style lang="sass">', async () => {
Expand All @@ -242,7 +240,7 @@ describe('CSS', function () {
expect(el.attr('class')).to.include('svelte-sass');

// 2. check CSS
expect(bundledCSS).to.match(new RegExp(`.svelte-sass.${scopedClass}[^{]*{font-family:"Comic Sans MS"`));
expect(bundledCSS).to.match(new RegExp(`.svelte-sass.${scopedClass}[^{]*{font-family:Comic Sans MS`));
});

it('<style lang="scss">', async () => {
Expand All @@ -254,7 +252,7 @@ describe('CSS', function () {
expect(el.attr('class')).to.include('svelte-scss');

// 2. check CSS
expect(bundledCSS).to.match(new RegExp(`.svelte-scss.${scopedClass}[^{]*{font-family:"Comic Sans MS"`));
expect(bundledCSS).to.match(new RegExp(`.svelte-scss.${scopedClass}[^{]*{font-family:Comic Sans MS`));
});
});
});
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/postcss.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ describe('PostCSS', () => {
});

it('works in JSX', () => {
expect(bundledCSS).to.match(new RegExp(`.solid${PREFIXED_CSS}`));
expect(bundledCSS).to.match(new RegExp(`.solid[^{]*${PREFIXED_CSS}`));
});

it('works in Vue', () => {
expect(bundledCSS).to.match(new RegExp(`.vue${PREFIXED_CSS}`));
expect(bundledCSS).to.match(new RegExp(`.vue[^{]*${PREFIXED_CSS}`));
});

it('works in Svelte', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"yargs-parser": "^21.0.0"
},
"devDependencies": {
"@types/yargs-parser": "^20.2.1",
"@types/yargs-parser": "^21.0.0",
"astro-scripts": "workspace:*",
"uvu": "^0.5.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-astro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function main() {
console.log(`${green(`>`)} ${gray(`Prepare for liftoff.`)}`);
console.log(`${green(`>`)} ${gray(`Gathering mission details...`)}`);

const cwd = args['_'][2] || '.';
const cwd = args['_'][2] as string || '.';
if (fs.existsSync(cwd)) {
if (fs.readdirSync(cwd).length > 0) {
const response = await prompts({
Expand Down
2 changes: 1 addition & 1 deletion packages/webapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.0",
"@types/mocha": "^9.0.0",
"@types/node": "^15.12.2",
"@types/node": "^14.0.0",
"@ungap/structured-clone": "^0.3.4",
"abort-controller": "^3.0.0",
"event-target-shim": "^6.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/webapi/src/lib/Timeout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function setTimeout<
>(callback: TFunc, delay = 0, ...args: TArgs): number {
const func = _.__function_bind(callback, globalThis)
const tick = ++INTERNAL.tick
const timeout = nodeSetTimeout(func, delay, ...args)
const timeout = nodeSetTimeout(func as any, delay, ...args)

INTERNAL.pool.set(tick, timeout)

Expand Down
Loading

0 comments on commit 79fc320

Please sign in to comment.