Skip to content

Commit

Permalink
Release 4.3.0-rc.1 (#167)
Browse files Browse the repository at this point in the history
* Release 4.3.0-rc.1
- Fix type generation
- Upgrade dependencies
- Upgrade jest config to remove warning

* Fix the replaceAll by a replace regex due to node v14

---------

Co-authored-by: Jean-Philippe Zolesio <zolesio@adobe.com>
  • Loading branch information
holblin and Jean-Philippe Zolesio committed Jul 27, 2023
1 parent c87dc8c commit b47f1ac
Show file tree
Hide file tree
Showing 4 changed files with 1,532 additions and 1,290 deletions.
13 changes: 8 additions & 5 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
const ignores = ['/node_modules/', '__mocks__', '/dist/'];

/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
/** @type {import('jest').Config} */
module.exports = {
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: 'tsconfig.test.json',
},
],
},
preset: 'ts-jest',
testEnvironment: 'node',
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/css-tools",
"version": "4.3.0-beta.2",
"version": "4.3.0-rc.1",
"description": "CSS parser / stringifier",
"source": "src/index.ts",
"main": "./dist/index.cjs",
Expand All @@ -16,25 +16,25 @@
"Readme.md"
],
"devDependencies": {
"@parcel/packager-ts": "2.8.3",
"@parcel/transformer-typescript-types": "2.8.3",
"@parcel/packager-ts": "2.9.3",
"@parcel/transformer-typescript-types": "2.9.3",
"@types/benchmark": "^2.1.1",
"@types/bytes": "^3.1.1",
"@types/jest": "^28.1.1",
"@types/node": "^18.0.0",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"benchmark": "^2.1.4",
"bytes": "^3.1.0",
"gts": "^3.1.1",
"jest": "^28.1.1",
"parcel": "^2.8.3",
"ts-jest": "^28.0.4",
"gts": "^5.0.0",
"jest": "^29.6.2",
"parcel": "^2.9.3",
"ts-jest": "^29.1.1",
"typescript": "^5.0.2"
},
"scripts": {
"benchmark": "node benchmark/index.mjs",
"test": "jest",
"clean": "gts clean && rm -rf ./dist",
"build": "parcel build",
"build": "parcel build && node ./utils/fix-type-generation.cjs",
"fix": "gts fix",
"lint": "gts lint",
"prepack": "npm run build",
Expand Down
12 changes: 12 additions & 0 deletions utils/fix-type-generation.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Due to a bug in parcel 2, the type definition contains bad path.
// See : https://github.com/parcel-bundler/parcel/issues/8908
// Might also relate to: https://github.com/parcel-bundler/parcel/issues/7790

const typePath = require('../package.json').types;
const {readFileSync, writeFileSync} = require('fs');
let content = readFileSync(typePath, 'utf8');
content = content.replace(
/import\("src\/type"\)\.CssStylesheetAST/g,
'CssStylesheetAST'
);
writeFileSync(typePath, content, 'utf8');

0 comments on commit b47f1ac

Please sign in to comment.