Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): [email protected], latest others #2945

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
893 changes: 468 additions & 425 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"prettify": "npx prettier . --write"
},
"devDependencies": {
"@file-services/memory": "^8.3.3",
"@file-services/node": "^8.3.3",
"@file-services/memory": "^9.0.0",
"@file-services/node": "^9.0.0",
"@rollup/plugin-html": "^1.0.3",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.11",
"@types/chai": "^4.3.12",
"@types/chai-subset": "^1.3.5",
"@types/css-selector-tokenizer": "^0.7.4",
"@types/cssesc": "^3.0.2",
Expand All @@ -39,42 +39,42 @@
"@types/mocha": "^10.0.6",
"@types/node": "18",
"@types/postcss-safe-parser": "^5.0.4",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@types/validate-npm-package-name": "^4.0.2",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@typescript-eslint/rule-tester": "^7.0.1",
"autoprefixer": "^10.4.17",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@typescript-eslint/rule-tester": "^7.1.1",
"autoprefixer": "^10.4.18",
"c8": "^9.1.0",
"chai": "^4.3.10",
"chai-subset": "^1.6.0",
"create-listening-server": "^2.1.0",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.0",
"mini-css-extract-plugin": "^2.8.0",
"mini-css-extract-plugin": "^2.8.1",
"mocha": "^10.3.0",
"node-eval": "^2.0.0",
"npm-run-all": "^4.1.5",
"playwright-chromium": "^1.41.2",
"playwright-chromium": "^1.42.1",
"postcss": "^8.4.35",
"promise-assist": "^2.0.1",
"raw-loader": "^4.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.5",
"rollup": "^4.12.0",
"rollup": "^4.12.1",
"source-map": "^0.7.4",
"source-map-loader": "^5.0.0",
"style-loader": "^3.3.4",
"ts-expect": "^1.3.0",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "~5.3.3",
"url-loader": "^4.1.1",
"webpack": "^5.90.2",
"webpack": "^5.90.3",
"yargs": "^17.7.2"
},
"engines": {
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"test": "mocha \"./dist/test/**/*.spec.js\" --timeout 25000"
},
"dependencies": {
"@file-services/node": "^8.3.3",
"@file-services/types": "^8.3.3",
"@file-services/node": "^9.0.0",
"@file-services/types": "^9.0.0",
"@stylable/build-tools": "^5.16.0",
"@stylable/code-formatter": "^5.16.0",
"@stylable/core": "^5.16.0",
Expand All @@ -22,6 +22,7 @@
"@stylable/optimizer": "^5.16.0",
"@wixc3/resolve-directory-context": "^4.0.0",
"decache": "^4.6.2",
"js-base64": "^3.7.7",
"lodash.camelcase": "^4.3.0",
"lodash.upperfirst": "^4.3.1",
"mime": "^3.0.0",
Expand Down
14 changes: 3 additions & 11 deletions packages/cli/src/build-single-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function buildSingleFile({
log(mode, filePath);

let content: string = tryRun(
() => fs.readFileSync(filePath).toString(),
() => fs.readFileSync(filePath, 'utf8'),
`Read File Error: ${filePath}`
);
const res = tryRun(
Expand Down Expand Up @@ -351,16 +351,8 @@ function inlineAssetsForJsModule(res: StylableResults, stylable: Stylable, fs: I
processUrlDependencies({
meta: { targetAst: ast, source: res.meta.source },
rootContext: stylable.projectRoot,
getReplacement: ({ absoluteRequest, url }) => {
if (isAsset(url)) {
let content = fs.readFileSync(absoluteRequest);
if (typeof content === 'string') {
content = Buffer.from(content);
}
return fileToDataUri(absoluteRequest, content);
}
return url;
},
getReplacement: ({ absoluteRequest, url }) =>
isAsset(url) ? fileToDataUri(absoluteRequest, fs.readFileSync(absoluteRequest)) : url,
host: fs,
});
return ast;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/code-mods/code-mods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function codeMods({ fs, rootDir, extension, mods, log }: CodeModsOptions)
const finished: ApplyCodeModsSuccess[] = [];

for (const filePath of files) {
const source = fs.readFileSync(filePath).toString();
const source = fs.readFileSync(filePath, 'utf8');
const result = applyCodeMods(filePath, source, mods);

if (result.type === 'failure') {
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/file-to-data-uri.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Base64 } from 'js-base64';
import mime from 'mime';

export function fileToDataUri(filename: string, content: { toString: (arg0: 'base64') => string }) {
return `data:${mime.getType(filename)};charset=utf-8;base64,${content.toString('base64')}`;
export function fileToDataUri(filename: string, content: Uint8Array) {
return `data:${mime.getType(filename)};charset=utf-8;base64,${Base64.fromUint8Array(content)}`;
}
18 changes: 9 additions & 9 deletions packages/cli/test/generate-index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/index.st.css').toString();
const res = fs.readFileSync('/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('./dist/index.st.css').toString();
const res = fs.readFileSync('./dist/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -131,7 +131,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/dist/index.st.css').toString();
const res = fs.readFileSync('/dist/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -173,7 +173,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/index.st.css').toString();
const res = fs.readFileSync('/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -216,7 +216,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/index.st.css').toString();
const res = fs.readFileSync('/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -262,7 +262,7 @@ describe('build index', () => {

expect(fs.existsSync('/index.st.css'), 'index is not generated').to.eql(true);

const res = fs.readFileSync('/index.st.css').toString();
const res = fs.readFileSync('/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -305,7 +305,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/index.st.css').toString();
const res = fs.readFileSync('/index.st.css', 'utf8');

expect(res.trim()).to.equal(
':import {-st-from: "./comp-A.st.css";-st-default:Style0;}\n.root Style0{}'
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/index.st.css').toString();
const res = fs.readFileSync('/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[
Expand Down Expand Up @@ -390,7 +390,7 @@ describe('build index', () => {
}
);

const res = fs.readFileSync('/some-dir/other-dir/index.st.css').toString();
const res = fs.readFileSync('/some-dir/other-dir/index.st.css', 'utf8');

expect(res.trim()).to.equal(
[':import {-st-from: "../../comp.st.css";-st-default:Comp;}', '.root Comp{}'].join('\n')
Expand Down
2 changes: 1 addition & 1 deletion packages/core-test-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "mocha \"./dist/test/**/*.spec.js\""
},
"dependencies": {
"@file-services/memory": "^8.3.3",
"@file-services/memory": "^9.0.0",
"@stylable/core": "^5.16.0",
"chai": "^4.3.10",
"flat": "^5.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "mocha \"./dist/test/**/*.spec.js\""
},
"dependencies": {
"@file-services/resolve": "^8.3.3",
"@file-services/resolve": "^9.0.0",
"@tokey/css-selector-parser": "^0.6.2",
"@tokey/css-value-parser": "^0.1.4",
"@tokey/imports-parser": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@stylable/runtime": "^5.16.0",
"node-eval": "^2.0.0",
"playwright-core": "^1.41.2",
"playwright-core": "^1.42.1",
"rimraf": "^5.0.5"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"esbuild": ">=0.17.18"
},
"dependencies": {
"@file-services/node": "^8.3.3",
"@file-services/node": "^9.0.0",
"@stylable/build-tools": "^5.16.0",
"@stylable/cli": "^5.16.0",
"@stylable/core": "^5.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-plugin-stylable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"test": "mocha \"dist/test/**/*.spec.js\" --timeout 5000"
},
"dependencies": {
"@file-services/node": "^8.3.3",
"@file-services/node": "^9.0.0",
"@stylable/core": "^5.16.0",
"@typescript-eslint/utils": "^7.0.1",
"@typescript-eslint/scope-manager": "^7.0.1",
"@typescript-eslint/utils": "^7.1.1",
"@typescript-eslint/scope-manager": "^7.1.1",
"postcss-safe-parser": "^7.0.0"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "mocha \"./dist/test/**/*.spec.js\""
},
"dependencies": {
"@file-services/node": "^8.3.3",
"@file-services/node": "^9.0.0",
"@stylable/core": "^5.16.0",
"@stylable/module-utils": "^5.16.0",
"@stylable/node": "^5.16.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/language-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"typescript": ">=3.8"
},
"dependencies": {
"@file-services/types": "^8.3.3",
"@file-services/typescript": "^8.3.3",
"@file-services/types": "^9.0.0",
"@file-services/typescript": "^9.0.0",
"@stylable/code-formatter": "^5.16.0",
"@stylable/core": "^5.16.0",
"@tokey/core": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "mocha \"./dist/test/**/*.spec.js\" --timeout 10000"
},
"dependencies": {
"@file-services/node": "^8.3.3",
"@file-services/node": "^9.0.0",
"@stylable/build-tools": "^5.16.0",
"@stylable/core": "^5.16.0",
"@stylable/module-utils": "^5.16.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"rollup": "^2.70.0 || ^3.0.0 || ^4.0.0"
},
"dependencies": {
"@file-services/node": "^8.3.3",
"@file-services/node": "^9.0.0",
"@stylable/build-tools": "^5.16.0",
"@stylable/cli": "^5.16.0",
"@stylable/core": "^5.16.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@stylable/optimizer": "^5.16.0",
"@stylable/runtime": "^5.16.0",
"decache": "^4.6.2",
"enhanced-resolve": "^5.15.0",
"enhanced-resolve": "^5.15.1",
"lodash.clonedeep": "^4.5.0",
"postcss": "^8.4.35"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-plugin/src/plugin-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function replaceMappedCSSAssetPlaceholders({
return extractFilenameFromAssetModule(assetModule, publicPath);
} else {
const data = new Map<string, unknown>();
const assetModuleSource = assetModule.generator.generate(assetModule, {
const assetModuleSource = assetModule.generator!.generate(assetModule, {
chunkGraph,
moduleGraph,
runtime,
Expand Down
Loading