Skip to content

Commit 2f02f08

Browse files
LaurentClaesclaude
andcommitted
Upgrade @drawbotics/s3sync to 2.0.0 and @drawbotics/use-screen-size to 3.1.0
Convert sync scripts from CommonJS to ESM (.js → .mjs) to support s3sync 2.0.0 which is now ESM-only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fd2037c commit 2f02f08

10 files changed

Lines changed: 99 additions & 114 deletions

File tree

package-lock.json

Lines changed: 67 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
"@babel/preset-env": "^7.24.0",
5959
"@babel/preset-react": "^7.24.0",
6060
"@babel/preset-typescript": "^7.0.0",
61-
"@drawbotics/s3sync": "^1.0.1",
62-
"@drawbotics/use-screen-size": "^3.0.1",
61+
"@drawbotics/s3sync": "^2.0.0",
62+
"@drawbotics/use-screen-size": "^3.1.0",
6363
"@emotion/babel-plugin": "^11.13.5",
6464
"@emotion/jest": "^11.14.0",
6565
"@mdx-js/loader": "^1.6.21",

packages/drylus-style-vars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "rimraf dist/ tmp/",
1414
"build:ts": "tsc",
1515
"build": "npm run clean && npm run build:ts && node scripts/build.js",
16-
"sync": "node scripts/sync.js",
16+
"sync": "node scripts/sync.mjs",
1717
"build:dev": "npm run build && NODE_ENV=development npm run sync",
1818
"prepublishOnly": "npm run build && NODE_ENV=production npm run sync"
1919
},

packages/drylus-style-vars/scripts/sync.js renamed to packages/drylus-style-vars/scripts/sync.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
const path = require('path');
2-
const s3sync = require('@drawbotics/s3sync');
1+
/* global process */
2+
import path from 'path';
3+
import { fileURLToPath } from 'url';
4+
import s3sync from '@drawbotics/s3sync';
5+
import { createRequire } from 'module';
6+
7+
const require = createRequire(import.meta.url);
8+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
39

410
const version = require('../package.json').version;
511

packages/icons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"generate-fonts": "webfont ./icons/*.svg --dest ./dist --template css --template-class-name drycon --font-name drycons --font-height 150",
2424
"build:fonts": "node scripts/build.js",
2525
"build": "npm run clean && mkdir dist && npm run build:fonts",
26-
"sync": "node scripts/sync.js",
26+
"sync": "node scripts/sync.mjs",
2727
"build:dev": "npm run build && NODE_ENV=development npm run sync",
2828
"prepublishOnly": "npm run build && NODE_ENV=production npm run sync"
2929
},
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
const path = require('path');
2-
const s3sync = require('@drawbotics/s3sync');
3-
const { CloudFrontClient, CreateInvalidationCommand } = require('@aws-sdk/client-cloudfront');
1+
/* global process, console */
2+
import path from 'path';
3+
import { fileURLToPath } from 'url';
4+
import s3sync from '@drawbotics/s3sync';
5+
import { CloudFrontClient, CreateInvalidationCommand } from '@aws-sdk/client-cloudfront';
6+
import { createRequire } from 'module';
7+
8+
const require = createRequire(import.meta.url);
9+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
410

511
const version = require('../package.json').version;
612
const cloudfront = new CloudFrontClient({ region: 'eu-west-1' });

packages/react-drylus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"dependencies": {
6767
"@drawbotics/drylus-style-vars": "file:../drylus-style-vars",
6868
"@drawbotics/icons": "file:../icons",
69-
"@drawbotics/use-screen-size": "^3.0.1",
69+
"@drawbotics/use-screen-size": "^3.1.0",
7070
"@emotion/css": "^11.13.5",
7171
"@emotion/react": "^11.14.0",
7272
"dayjs": "^1.11.19",

packages/styleguide/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@dnd-kit/utilities": "^3.2.2",
2121
"@drawbotics/icons": "file:../icons",
2222
"@drawbotics/react-drylus": "file:../react-drylus",
23-
"@drawbotics/use-screen-size": "^3.0.1",
23+
"@drawbotics/use-screen-size": "^3.1.0",
2424
"@drawbotics/vanilla-drylus": "file:../vanilla-drylus",
2525
"@emotion/css": "^11.13.5",
2626
"hast-util-to-string": "^1.0.1",

packages/vanilla-drylus/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"sideEffects": false,
1010
"scripts": {
1111
"clean": "rimraf dist",
12-
"sync": "node scripts/sync.js",
12+
"sync": "node scripts/sync.mjs",
1313
"watch:lib": "NODE_ENV=development webpack --config webpack.config.js --watch",
1414
"watch:react": "node ./scripts/watch-react.js",
1515
"watch": "NODE_ENV=development webpack --config webpack.config.js --watch",
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
const path = require('path');
2-
const s3sync = require('@drawbotics/s3sync');
1+
/* global process */
2+
import path from 'path';
3+
import { fileURLToPath } from 'url';
4+
import s3sync from '@drawbotics/s3sync';
5+
import { createRequire } from 'module';
6+
7+
const require = createRequire(import.meta.url);
8+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
39

410
const version = require('../package.json').version;
511

0 commit comments

Comments
 (0)