rollup-plugin-react-scoped-css 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addHashAttributesToJsxTagsAst = void 0;
3
+ exports.addHashAttributesToJsxTagsAst = addHashAttributesToJsxTagsAst;
4
4
  const ast_iterator_1 = require("./ast-iterator");
5
5
  const ast_transformer_1 = require("./ast-transformer");
6
6
  const ast_utils_1 = require("./ast.utils");
@@ -38,4 +38,3 @@ function addHashAttributesToJsxTagsAst(program, attr) {
38
38
  }
39
39
  });
40
40
  }
41
- exports.addHashAttributesToJsxTagsAst = addHashAttributesToJsxTagsAst;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scopeCss = void 0;
3
+ exports.scopeCss = scopeCss;
4
4
  const css_tree_1 = require("css-tree");
5
5
  const getSelectors = (items) => {
6
6
  const selectorLists = items.reduce((acc, node) => {
@@ -85,4 +85,3 @@ function scopeCss(css, filename, hash) {
85
85
  return css;
86
86
  }
87
87
  }
88
- exports.scopeCss = scopeCss;
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reactScopedCssPlugin = void 0;
4
- /* eslint-disable no-useless-escape */
3
+ exports.reactScopedCssPlugin = reactScopedCssPlugin;
5
4
  const path_1 = require("path");
6
5
  const js_xxhash_1 = require("js-xxhash");
7
6
  const pluginutils_1 = require("@rollup/pluginutils");
@@ -105,4 +104,3 @@ function reactScopedCssPlugin(optionsIn = {}) {
105
104
  },
106
105
  ];
107
106
  }
108
- exports.reactScopedCssPlugin = reactScopedCssPlugin;
@@ -5,4 +5,4 @@ var ParserImplementations;
5
5
  (function (ParserImplementations) {
6
6
  ParserImplementations["modern"] = "modern";
7
7
  ParserImplementations["legacy"] = "legacy";
8
- })(ParserImplementations = exports.ParserImplementations || (exports.ParserImplementations = {}));
8
+ })(ParserImplementations || (exports.ParserImplementations = ParserImplementations = {}));
@@ -0,0 +1,81 @@
1
+ import typescriptPlugin from "@typescript-eslint/eslint-plugin";
2
+ import typescriptParser from "@typescript-eslint/parser";
3
+ import reactPlugin from "eslint-plugin-react";
4
+ import prettierPlugin from "eslint-plugin-prettier";
5
+
6
+ export default [
7
+ {
8
+ files: ["**/*.{js,jsx,ts,tsx}"],
9
+ languageOptions: {
10
+ ecmaVersion: "latest",
11
+ sourceType: "module",
12
+ globals: {
13
+ window: "readonly",
14
+ document: "readonly",
15
+ },
16
+ parser: typescriptParser,
17
+ parserOptions: {
18
+ ecmaFeatures: {
19
+ jsx: true,
20
+ },
21
+ },
22
+ },
23
+ plugins: {
24
+ react: reactPlugin,
25
+ "@typescript-eslint": typescriptPlugin,
26
+ prettier: prettierPlugin,
27
+ },
28
+ rules: {
29
+ "react/jsx-filename-extension": [1, { extensions: [".jsx", ".tsx"] }],
30
+ },
31
+ settings: {
32
+ react: {
33
+ version: "detect",
34
+ },
35
+ },
36
+ ignores: [
37
+ "**/node_modules/**",
38
+ "**/__mocks__/**",
39
+ "**/dist/**",
40
+ "**/examples/**",
41
+ ],
42
+ },
43
+ {
44
+ files: ["**/*.ts", "**/*.tsx"],
45
+ languageOptions: {
46
+ parser: typescriptParser,
47
+ },
48
+ rules: {},
49
+ ignores: [
50
+ "**/node_modules/**",
51
+ "**/__mocks__/**",
52
+ "**/dist/**",
53
+ "**/examples/**",
54
+ ],
55
+ },
56
+ {
57
+ files: ["**/*.js", "**/*.jsx"],
58
+ languageOptions: {},
59
+ rules: {},
60
+ ignores: [
61
+ "**/node_modules/**",
62
+ "**/__mocks__/**",
63
+ "**/dist/**",
64
+ "**/examples/**",
65
+ ],
66
+ },
67
+ {
68
+ plugins: {
69
+ prettier: prettierPlugin,
70
+ },
71
+ rules: {
72
+ "prettier/prettier": "error", // Enforce Prettier formatting
73
+ },
74
+ ignores: [
75
+ "**/node_modules/**",
76
+ "**/__mocks__/**",
77
+ "**/dist/**",
78
+ "**/examples/**",
79
+ ],
80
+ },
81
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup-plugin-react-scoped-css",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "A rollup plugin designed to allow scoped css to be run in react (Compatible with vite and rollup)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,37 +34,38 @@
34
34
  },
35
35
  "homepage": "https://github.com/cmseguin/rollup-plugin-react-scoped-css#readme",
36
36
  "dependencies": {
37
- "@rollup/pluginutils": "5.1.0",
38
- "css-tree": "2.3.1",
39
- "escodegen": "2.0.0",
40
- "js-xxhash": "2.0.0",
41
- "rollup": "4.6.0"
37
+ "@rollup/pluginutils": "5.1.2",
38
+ "css-tree": "3.0.0",
39
+ "escodegen": "2.1.0",
40
+ "js-xxhash": "4.0.0",
41
+ "rollup": "4.24.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@babel/core": "7.20.12",
45
- "@babel/preset-env": "7.20.2",
46
- "@babel/preset-react": "7.18.6",
47
- "@babel/preset-typescript": "7.18.6",
48
- "@semantic-release/commit-analyzer": "9.0.2",
44
+ "@babel/core": "7.25.8",
45
+ "@babel/preset-env": "7.25.8",
46
+ "@babel/preset-react": "7.25.7",
47
+ "@babel/preset-typescript": "7.25.7",
48
+ "@semantic-release/commit-analyzer": "13.0.0",
49
49
  "@semantic-release/git": "10.0.1",
50
- "@semantic-release/github": "8.0.7",
51
- "@semantic-release/npm": "11.0.1",
52
- "@semantic-release/release-notes-generator": "10.0.3",
53
- "@types/css-tree": "2.3.3",
54
- "@types/escodegen": "0.0.7",
55
- "@types/estree": "1.0.0",
56
- "@types/jest": "29.2.5",
57
- "@typescript-eslint/eslint-plugin": "5.48.1",
58
- "@typescript-eslint/parser": "5.48.1",
59
- "acorn": "8.8.1",
60
- "eslint": "8.32.0",
61
- "eslint-config-prettier": "8.6.0",
62
- "eslint-plugin-import": "2.27.4",
50
+ "@semantic-release/github": "11.0.0",
51
+ "@semantic-release/npm": "12.0.1",
52
+ "@semantic-release/release-notes-generator": "14.0.1",
53
+ "@types/css-tree": "2.3.8",
54
+ "@types/escodegen": "0.0.10",
55
+ "@types/estree": "1.0.6",
56
+ "@types/jest": "29.5.13",
57
+ "@types/node": "22.7.5",
58
+ "@typescript-eslint/eslint-plugin": "8.9.0",
59
+ "@typescript-eslint/parser": "8.9.0",
60
+ "acorn": "8.12.1",
61
+ "eslint": "9.12.0",
62
+ "eslint-config-prettier": "9.1.0",
63
+ "eslint-plugin-import": "2.31.0",
63
64
  "eslint-plugin-node": "11.1.0",
64
- "eslint-plugin-prettier": "4.2.1",
65
- "eslint-plugin-react": "7.32.0",
66
- "jest": "^29.7.0",
67
- "semantic-release": "22.0.7",
68
- "typescript": "4.9.4"
65
+ "eslint-plugin-prettier": "5.2.1",
66
+ "eslint-plugin-react": "7.37.1",
67
+ "jest": "29.7.0",
68
+ "semantic-release": "24.1.2",
69
+ "typescript": "5.5.4"
69
70
  }
70
71
  }
package/.eslintrc.yml DELETED
@@ -1,29 +0,0 @@
1
- env:
2
- browser: true
3
- es2021: true
4
- extends:
5
- - eslint:recommended
6
- - plugin:@typescript-eslint/eslint-recommended
7
- - plugin:@typescript-eslint/recommended
8
- - plugin:react/recommended
9
- - plugin:prettier/recommended
10
- - plugin:react/jsx-runtime
11
- parser: '@typescript-eslint/parser'
12
- parserOptions:
13
- ecmaFeatures:
14
- jsx: true
15
- ecmaVersion: "latest"
16
- sourceType: module
17
- plugins:
18
- - react
19
- - '@typescript-eslint'
20
- settings:
21
- react:
22
- version: "detect"
23
- ignorePatterns:
24
- - "**/node_modules/**"
25
- - "**/__mocks__/**/*.js"
26
- - "**/dist/**"
27
- rules: {
28
- "react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }]
29
- }