Skip to content

Commit

Permalink
feat: update package
Browse files Browse the repository at this point in the history
  • Loading branch information
megheaiulian committed Nov 17, 2023
1 parent ca9879d commit 9f4dd9c
Show file tree
Hide file tree
Showing 21 changed files with 5,979 additions and 5,385 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: ["17", "16", "14", "12"]
node: ["18"]

steps:
- name: Code checkout
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6
version: 8

- name: Setup node
uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6
version: 8

- name: Setup node
uses: actions/setup-node@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jobs:

steps:
- name: Code checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 6
version: 8

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "16"
cache: "pnpm"
node-version: 18
cache: pnpm

- name: Install dependencies
run: |
Expand Down
192 changes: 192 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions __tests__/__snapshots__/importer.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`importer warns about being unresolved: warning 1`] = `"Unresolved \`@import\` in \`@import \\"smh.css\\"\`"`;
exports[`importer warns about being unresolved: warning 1`] = `"Unresolved \`@import\` in \`@import "smh.css"\`"`;

exports[`importer warns about empty url: warning 1`] = `"Empty URL in \`@import \\" \\"\`"`;
exports[`importer warns about empty url: warning 1`] = `"Empty URL in \`@import " "\`"`;

exports[`importer warns about incorrect resolving: warning 1`] = `"Incorrectly resolved \`@import\` in \`@import \\"smh.css\\"\`"`;
exports[`importer warns about incorrect resolving: warning 1`] = `"Incorrectly resolved \`@import\` in \`@import "smh.css"\`"`;

exports[`importer warns about invalid url function: warning 1`] = `"Invalid \`url\` function in \`@import omg(\\"smh.css\\")\`"`;
exports[`importer warns about invalid url function: warning 1`] = `"Invalid \`url\` function in \`@import omg("smh.css")\`"`;

exports[`importer warns about lack of termination: warning 1`] = `"\`@import\` was not terminated correctly"`;

exports[`importer warns about loop: warning 1`] = `"\`@import\` loop in \`@import \\"./foo.css\\"\`"`;
exports[`importer warns about loop: warning 1`] = `"\`@import\` loop in \`@import "./foo.css"\`"`;

exports[`importer warns about no url: warning 1`] = `"No URL in \`@import\`"`;

Expand Down
1,634 changes: 819 additions & 815 deletions __tests__/__snapshots__/index.test.ts.snap

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion __tests__/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function write(data: WriteData): Promise<WriteResult> {
plugins: data.plugins ?? [styles(data.options)],
onwarn: (warning, warn) => {
if (warning.code === "EMPTY_BUNDLE") return;
if (warning.source === "lit") return;
if (warning.plugin === "lit") return;
if (/Exported `\S+` as `\S+` in \S+/.test(warning.message)) return;
warn(warning);
},
Expand Down
17 changes: 9 additions & 8 deletions __tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/naming-convention */
import fs from "fs-extra";
import { rollup } from "rollup";
import { RawSourceMap } from "source-map-js";
Expand Down Expand Up @@ -343,7 +344,7 @@ validateMany("extract", [
title: "preserve-modules",
input: "simple/index.js",
options: { mode: "extract" },
inputOpts: { preserveModules: true },
outputOpts: { preserveModules: true },
},
{
title: "absolute-path-fail",
Expand Down Expand Up @@ -585,7 +586,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: { preserveModules: true },
outputOpts: { preserveModules: true },
},
{
title: "preserve-modules-single",
Expand All @@ -595,7 +596,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: { preserveModules: true },
outputOpts: { preserveModules: true },
},
{
title: "preserve-modules-multi-entry",
Expand All @@ -605,7 +606,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: { preserveModules: true },
outputOpts: { preserveModules: true },
},
{
title: "multi-entry",
Expand Down Expand Up @@ -633,7 +634,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: {
outputOpts: {
manualChunks(id) {
if (id.includes("third")) return "thirds";
if (id.includes("fourth")) return "fourts";
Expand All @@ -650,7 +651,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: {
outputOpts: {
manualChunks(id) {
if (id.includes("third")) return "thirds";
if (id.includes("fourth")) return "fourts";
Expand All @@ -667,7 +668,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: {
outputOpts: {
manualChunks(id) {
if (id.includes("third")) return "thirds";
if (id.includes("fourth")) return "fourts";
Expand All @@ -684,7 +685,7 @@ validateMany("code-splitting", [
modules: true,
sourceMap: true,
},
inputOpts: {
outputOpts: {
manualChunks(id) {
if (id.includes("third")) return "thirds";
if (id.includes("fourth")) return "fourts";
Expand Down
2 changes: 1 addition & 1 deletion __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ test("noop", async () => {
});

describe("load-module", () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const loadModule = jest.requireActual("../src/utils/load-module")
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
.default as typeof loadModuleMock;

test("wrong path", () => {
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = api => {
api.cache.invalidate(() => process.env.NODE_ENV === "production");

const presets = [["@babel/preset-env", { modules: false, targets: { node: "12" } }]];
const plugins = ["@babel/plugin-proposal-class-properties"];
const plugins = [];

if (api.env("test")) presets[0][1].modules = "commonjs";

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
testEnvironment: "node",
transform: { "^.+\\.tsx?$": "ts-jest", "^.+\\.jsx?$": "babel-jest" },
transformIgnorePatterns,
globals: { "ts-jest": { tsconfig: { target: "es6", module: "commonjs" } } },
globals: { "ts-jest": { tsconfig: { target: "ES2021", module: "commonjs" } } },
testMatch: ["<rootDir>/__tests__/*.(spec|test).[jt]s?(x)"],
setupFilesAfterEnv: ["<rootDir>/__tests__/setup.ts"],
collectCoverageFrom: [
Expand Down
131 changes: 65 additions & 66 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-styles",
"version": "4.0.0",
"name": "rollup-styles",
"version": "1.0.0",
"description": "Universal Rollup plugin for styles: PostCSS, Sass, Less, Stylus and more",
"keywords": [
"rollup",
Expand All @@ -13,13 +13,13 @@
"less",
"stylus"
],
"homepage": "https://github.com/Anidetrix/rollup-plugin-styles#readme",
"homepage": "https://github.com/plumelo/rollup-styles#readme",
"bugs": {
"url": "https://github.com/Anidetrix/rollup-plugin-styles/issues"
"url": "https://github.com/plumelo/rollup-styles/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Anidetrix/rollup-plugin-styles.git"
"url": "git+https://github.com/plumelo/rollup-styles.git"
},
"license": "MIT",
"author": "Anton Kudryavtsev <boblobl4@gmail.com>",
Expand Down Expand Up @@ -50,83 +50,82 @@
"test": "jest"
},
"dependencies": {
"@rollup/pluginutils": "^4.1.2",
"cosmiconfig": "^7.0.1",
"cssnano": "^5.0.16",
"fs-extra": "^10.0.0",
"@rollup/pluginutils": "^5.0.0",
"cosmiconfig": "^7.1.0",
"cssnano": "^6.0.1",
"fs-extra": "^11.0.0",
"icss-utils": "^5.1.0",
"mime-types": "^2.1.34",
"mime-types": "^2.1.35",
"p-queue": "^6.6.2",
"postcss": "^8.4.5",
"postcss": "^8.4.31",
"postcss-modules-extract-imports": "^3.0.0",
"postcss-modules-local-by-default": "^4.0.0",
"postcss-modules-local-by-default": "^4.0.3",
"postcss-modules-scope": "^3.0.0",
"postcss-modules-values": "^4.0.0",
"postcss-value-parser": "^4.2.0",
"query-string": "^7.1.0",
"resolve": "^1.22.0",
"resolve.exports": "^1.1.0",
"query-string": "^7.1.3",
"resolve": "^1.22.8",
"resolve.exports": "^1.1.1",
"source-map-js": "^1.0.2",
"tslib": "^2.3.1"
"tslib": "^2.6.2"
},
"devDependencies": {
"@babel/core": "^7.16.12",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/preset-env": "^7.16.11",
"@commitlint/cli": "^16.1.0",
"@commitlint/config-angular": "^16.0.0",
"@commitlint/prompt-cli": "^16.1.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-typescript": "^8.3.0",
"@semantic-release/changelog": "^6.0.1",
"@babel/core": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@commitlint/cli": "^18.4.2",
"@commitlint/config-angular": "^18.4.2",
"@commitlint/prompt-cli": "^18.4.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.4.0",
"@types/mime-types": "^2.1.1",
"@types/node": "*",
"@types/resolve": "^1.20.1",
"@types/uglifycss": "^0.0.7",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"autoprefixer": "^10.4.2",
"babel-jest": "^27.4.6",
"eslint": "^8.7.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.0.0",
"eslint-plugin-unicorn": "^40.1.0",
"gh-pages": "^3.2.3",
"husky": "^7.0.4",
"@types/fs-extra": "^11.0.0",
"@types/jest": "^29.0.0",
"@types/mime-types": "^2.1.4",
"@types/node": "^20.9.1",
"@types/resolve": "^1.20.5",
"@types/uglifycss": "^0.0.10",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"autoprefixer": "^10.4.16",
"babel-jest": "^29.0.0",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-unicorn": "^49.0.0",
"gh-pages": "^6.0.0",
"husky": "^8.0.0",
"is-ci": "^3.0.1",
"jest": "^27.4.7",
"less": "^4.1.2",
"lint-staged": "^12.3.2",
"jest": "^29.0.0",
"less": "^4.2.0",
"lint-staged": "^15.0.0",
"minireset.css": "^0.0.7",
"node-sass": "^7.0.1",
"postcss-custom-properties": "^12.1.3",
"prettier": "^2.5.1",
"rollup": "^2.66.1",
"rollup-plugin-dts": "^4.1.0",
"rollup-plugin-lit-css": "^3.2.1",
"rollup-plugin-node-externals": "^3.1.2",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.49.0",
"semantic-release": "^19.0.2",
"node-sass": "^9.0.0",
"postcss-custom-properties": "^13.0.0",
"prettier": "^3.0.0",
"rollup": "^4.4.1",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-lit-css": "^4.0.1",
"rollup-plugin-node-externals": "^6.1.2",
"sass": "^1.69.5",
"semantic-release": "^22.0.0",
"shx": "^0.3.4",
"stylus": "^0.56.0",
"stylus": "^0.61.0",
"sugarss": "^4.0.1",
"ts-jest": "^27.1.3",
"typedoc": "^0.22.11",
"typedoc-plugin-missing-exports": "^0.22.6",
"typescript": "^4.5.5"
"ts-jest": "^29.0.0",
"typedoc": "^0.25.3",
"typedoc-plugin-missing-exports": "^2.1.0",
"typescript": "^4.9.5"
},
"peerDependencies": {
"rollup": "^2.63.0"
"rollup": "^2.63.0 || ^3.0.0 || ^4.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
Expand Down
Loading

0 comments on commit 9f4dd9c

Please sign in to comment.