Skip to content

Commit

Permalink
Update packages dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Machy8 committed Sep 4, 2023
1 parent ccf12e0 commit 02cfd22
Show file tree
Hide file tree
Showing 12 changed files with 1,196 additions and 617 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm

- name: Versions
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends python make g++
apt-get remove -y cmdtest

RUN npm i -g n yarn && \
n 16.17.1 && \
n 18.17.1 && \
yarn global add pnpm && \
ln -sf /usr/local/n/versions/node/16.17.1/bin/node /usr/local/bin/node
ln -sf /usr/local/n/versions/node/18.17.1/bin/node /usr/local/bin/node

RUN node -v && \
npm -v
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"astro:build:notypes": "cross-env packages=astro pnpm build:notypes",
"astro:watch": "cross-env packages=astro watch=true pnpm watch",
"astro:plg": "cd packages/astro/playground && pnpm",
"astro:test": "pnpm jest:test packages/astro/tests/jest",
"astro:test": "pnpm jest:test packages/astro/tests/jest/astrov2",
"autoprefixer:build": "cross-env packages=autoprefixer pnpm build",
"autoprefixer:build:notypes": "cross-env packages=autoprefixer pnpm build:notypes",
"autoprefixer:watch": "cross-env packages=autoprefixer watch=true pnpm watch",
Expand Down Expand Up @@ -98,8 +98,5 @@
"packageManager": "pnpm@8.3.1",
"engines": {
"pnpm": "^8.3"
},
"dependencies": {
"@example/basics": "link:/usr/share/nginx/html/packages/astro/tests-tmp/astrov1-build"
}
}
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
"normalize-path": "^3.0.0"
},
"devDependencies": {
"astro": "^2.5.5"
"astro": "^3.0.0"
}
}
50 changes: 13 additions & 37 deletions packages/astro/tests/jest/astrov2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,34 @@ fse.copySync(path.join(bundleTestDir, 'input'), buildTmpDir);

execSync(`pnpm install . && pnpm build .`, {stdio: 'inherit', cwd: buildTmpDir});

const indexHtmlPart1 = `
<body class="e f">
<h1 class="g h i">Layout</h1>
`.trim();

const indexHtmlPart2 = `
<h1 class="i">Hello World!</h1>
<h2 class="l j m k"></h2>
<h3 class="g">Another text</h3>
<h2 class="a b">Subtitle</h2>
`.trim();

const indexHtmlPart3 = `
<strong class=" c d ">
Text
</strong>
`.trim()

const secondHtmlPart1 = `
<body class="e f">
<h1 class="g h i">Layout</h1>
`.trim();

const secondHtmlPart2 = `
<h1 class="n">Hello World 2!</h1>
<h2 class="a b">Subtitle</h2>
`.trim();

const secondHtmlPart3 = `
<strong class=" c d ">
Text
</strong>
`
const indexHtmlPart1 = `<body class="e f"><h1 class="g h i">Layout</h1>`.trim();

const indexHtmlPart2 = `<h1 class="i">Hello World!</h1><h2 class="l j m k"></h2><h3 class="g">Another text</h3><h2 class="a b">Subtitle</h2>`.trim();

const indexHtmlPart3 = `<strong class=" c d ">`.trim()

const secondHtmlPart1 = `<body class="e f"><h1 class="g h i">Layout</h1>`.trim();

const secondHtmlPart2 = `<h1 class="n">Hello World 2!</h1><h2 class="a b">Subtitle</h2>`.trim();

const secondHtmlPart3 = `<strong class=" c d ">`

const cssFilePart = ':root{--blue: darkblue}.a{color:orange}.c{color:test}.f{color:#00008b}.i{color:purple}.n{color:lightpurple}.b{font-size:24px}.d{font-size:123px}.g{font-size:48px}.m{font-size:12px}.l{font-weight:700}.h{margin-top:24px}.e{text-align:center}@media (min-width: 1024px){.j{color:darkpurple}.k{font-size:24px}}';

test('Astro v2', async (): Promise<void> => {
const [indexHtmlFileEntry] = FastGlob.sync(path.join(buildTmpDir, 'dist', 'index.html'));
const [secondHtmlFileEntry] = FastGlob.sync(path.join(buildTmpDir, 'dist', 'second', 'index.html'));
const [cssFileEntry] = FastGlob.sync(path.join(buildTmpDir, 'dist', '_astro', '*.css'));

const indexHtmlFileContent = testUtils.readFile(indexHtmlFileEntry);
const secondHtmlFileContent = testUtils.readFile(secondHtmlFileEntry);
const cssFileContent = testUtils.readFile(cssFileEntry);

expect(indexHtmlFileContent.includes(indexHtmlPart1)).toBeTruthy();
expect(indexHtmlFileContent.includes(indexHtmlPart2)).toBeTruthy();
expect(indexHtmlFileContent.includes(indexHtmlPart3)).toBeTruthy();
expect(indexHtmlFileContent.includes(cssFilePart)).toBeTruthy();

expect(secondHtmlFileContent.includes(secondHtmlPart1)).toBeTruthy();
expect(secondHtmlFileContent.includes(secondHtmlPart2)).toBeTruthy();
expect(secondHtmlFileContent.includes(secondHtmlPart3)).toBeTruthy();

expect(cssFileContent.includes(cssFilePart)).toBeTruthy();
expect(secondHtmlFileContent.includes(cssFilePart)).toBeTruthy();
});
2 changes: 1 addition & 1 deletion packages/astro/tests/jest/astrov2/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"dependencies": {
"@stylify/astro": "workspace:^",
"@stylify/stylify": "workspace:^",
"astro": "^2.0"
"astro": "^3.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"@stylify/stylify": "workspace:^",
"autoprefixer": "^10.4.14",
"chokidar": "^3.5.3",
"fast-glob": "^3.2.12",
"fast-glob": "^3.3.1",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
"postcss": "^8.4.23"
"postcss": "^8.4.29"
}
}
7 changes: 6 additions & 1 deletion packages/nuxt/tests/jest/nuxt/input/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ export default defineNuxtConfig({
modules: [
'@nuxt/content',
'@stylify/nuxt',
]
],
// Tmp fix for micromark
alias: {
"micromark/lib/preprocess.js": "micromark",
"micromark/lib/postprocess.js": "micromark",
},
});
16 changes: 8 additions & 8 deletions packages/unplugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@
"dependencies": {
"@stylify/bundler": "workspace:^",
"@stylify/stylify": "workspace:^",
"unplugin": "^1.3.1"
"unplugin": "^1.4.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-node-resolve": "^15.2.1",
"css-loader": "^6.8.1",
"esbuild": "^0.17.19",
"fast-glob": "^3.2.12",
"rollup": "^3.23.0",
"rollup-plugin-import-css": "~3.1.0",
"esbuild": "^0.19.2",
"fast-glob": "^3.3.1",
"rollup": "^3.28.0",
"rollup-plugin-import-css": "~3.3.1",
"rollup-plugin-postcss": "^4.0.2",
"style-loader": "^3.3.3",
"vite": "^4.3.9",
"webpack": "^5.84.1"
"vite": "^4.4.9",
"webpack": "^5.88.2"
}
}
4 changes: 2 additions & 2 deletions packages/unplugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ export const unplugin = createUnplugin((config: UnpluginConfigInterface = {}) =>
};
});

export const stylifyVite = unplugin.vite as UnpluginFactoryOutput<UnpluginConfigInterface, VitePlugin>;
export const stylifyRollup = unplugin.rollup as UnpluginFactoryOutput<UnpluginConfigInterface, RollupPlugin>;
export const stylifyVite = unplugin.vite as unknown as UnpluginFactoryOutput<UnpluginConfigInterface, VitePlugin>;
export const stylifyRollup = unplugin.rollup as unknown as UnpluginFactoryOutput<UnpluginConfigInterface, RollupPlugin>;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
export const stylifyWebpack = unplugin.webpack as UnpluginFactoryOutput<UnpluginConfigInterface, WebpackPluginInstance>;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
Expand Down
2 changes: 1 addition & 1 deletion packages/unplugin/tests/jest/webpack/expected/main.js

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

Loading

0 comments on commit 02cfd22

Please sign in to comment.