Skip to content

Commit 311d060

Browse files
committed
Address review findings and stabilize UI snapshots
Made-with: Cursor
1 parent db87382 commit 311d060

15 files changed

Lines changed: 1526 additions & 22 deletions

.github/workflows/ui-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
- name: Install dependencies
2929
run: npm ci
3030

31+
- name: Run project verification
32+
run: npm test
33+
3134
- name: Run Playwright UI tests
3235
run: npm run test:ui
3336
env:

.migration-plan.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Migration Plan
22

3+
Status: completed migration record. The "Current State Assessment" section below describes the baseline before this branch's work started, not the post-migration repo state.
4+
35
## Working Agreement
46
- Execute exactly one migration phase at a time.
57
- Stop after each phase and wait for explicit approval before starting the next one.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ This runs:
281281
npm run test:ui
282282
```
283283

284+
This rebuilds the distributable assets first, then runs Playwright against the packaged minified CSS and JS files.
285+
284286
### Update snapshot baselines
285287

286288
```sh

dist/baguetteBox.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* baguetteBox.js
33
* @author feimosi
4-
* @version 1.13.0
4+
* @version %%INJECT_VERSION%%
55
* @url https://github.com/feimosi/baguetteBox.js
66
*/
77

dist/baguetteBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*!
33
* baguetteBox.js
44
* @author feimosi
5-
* @version 1.13.0
5+
* @version %%INJECT_VERSION%%
66
* @url https://github.com/feimosi/baguetteBox.js
77
*/
88
(function (root, factory) {

dist/baguetteBox.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/baguetteBox.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const js = require('@eslint/js');
22
const globals = require('globals');
3+
const tseslint = require('typescript-eslint');
34

45
module.exports = [
56
{
@@ -18,6 +19,30 @@ module.exports = [
1819
}
1920
},
2021
js.configs.recommended,
22+
{
23+
files: ['src/**/*.ts'],
24+
languageOptions: {
25+
ecmaVersion: 'latest',
26+
sourceType: 'script',
27+
parser: tseslint.parser,
28+
globals: {
29+
...globals.browser,
30+
...globals.commonjs,
31+
define: 'readonly'
32+
}
33+
},
34+
plugins: {
35+
'@typescript-eslint': tseslint.plugin
36+
},
37+
rules: {
38+
'no-redeclare': 'off',
39+
'no-undef': 'off',
40+
'no-prototype-builtins': 'off',
41+
'no-unused-vars': 'off',
42+
'no-unused-expressions': 'off',
43+
'@typescript-eslint/no-unused-vars': ['error', { caughtErrors: 'none' }]
44+
}
45+
},
2146
{
2247
files: ['src/**/*.js'],
2348
languageOptions: {
@@ -61,7 +86,7 @@ module.exports = [
6186
}
6287
},
6388
{
64-
files: ['src/**/*.js', 'gulpfile.js', 'playwright.config.js', 'tests/**/*.js'],
89+
files: ['src/**/*.ts', 'src/**/*.js', 'gulpfile.js', 'playwright.config.js', 'tests/**/*.js'],
6590
rules: {
6691
indent: ['error', 4],
6792
quotes: ['error', 'single'],

gulpfile.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'use strict';
44

55
const childProcess = require('child_process');
6+
const fs = require('fs');
67
const gulp = require('gulp');
78
const plugins = require('gulp-load-plugins')();
89
const browserSync = require('browser-sync');
@@ -82,6 +83,11 @@ function buildDistJs() {
8283
.pipe(gulp.dest(dist.js));
8384
}
8485

86+
function syncCompatibilitySources() {
87+
fs.copyFileSync('./.tmp-build/baguetteBox.js', './src/baguetteBox.js');
88+
fs.copyFileSync('./src/baguetteBox.css', './src/baguetteBox.scss');
89+
}
90+
8591
function transpileTs(done) {
8692
childProcess.execFileSync(process.execPath, [
8793
require.resolve('typescript/bin/tsc'),
@@ -90,11 +96,14 @@ function transpileTs(done) {
9096
], {
9197
stdio: 'inherit'
9298
});
99+
syncCompatibilitySources();
93100
done();
94101
}
95102

96-
const buildDemo = gulp.parallel(buildDemoCss, buildDemoJs);
97-
const buildDist = gulp.parallel(buildDistCss, buildDistJs);
103+
const buildDemoJsTask = gulp.series(transpileTs, buildDemoJs);
104+
const buildDistJsTask = gulp.series(transpileTs, buildDistJs);
105+
const buildDemo = gulp.parallel(buildDemoCss, buildDemoJsTask);
106+
const buildDist = gulp.parallel(buildDistCss, buildDistJsTask);
98107

99108
function bumpMinor() {
100109
return gulp.src(['./bower.json', './package.json'])
@@ -126,7 +135,7 @@ function updateVersion() {
126135

127136
function watchFiles() {
128137
gulp.watch(paths.css, buildDemoCss);
129-
gulp.watch(paths.ts, gulp.series(transpileTs, buildDemoJs));
138+
gulp.watch(paths.ts, buildDemoJsTask);
130139
}
131140

132141
function watchBrowserSync(done) {
@@ -154,15 +163,18 @@ function deploy() {
154163
}));
155164
}
156165

157-
const build = gulp.series(transpileTs, gulp.parallel(buildDemo, buildDist), updateVersion);
158-
const watch = gulp.series(transpileTs, buildDemo, watchBrowserSync, watchFiles);
166+
const build = gulp.series(transpileTs, gulp.parallel(
167+
gulp.parallel(buildDemoCss, buildDemoJs),
168+
gulp.parallel(buildDistCss, buildDistJs)
169+
), updateVersion);
170+
const watch = gulp.series(buildDemo, watchBrowserSync, watchFiles);
159171
const release = gulp.series(bumpMinor, build);
160172
const patch = gulp.series(bumpPatch, build);
161173

162174
exports['build.demo-css'] = buildDemoCss;
163-
exports['build.demo-js'] = buildDemoJs;
175+
exports['build.demo-js'] = buildDemoJsTask;
164176
exports['build.dist-css'] = buildDistCss;
165-
exports['build.dist-js'] = buildDistJs;
177+
exports['build.dist-js'] = buildDistJsTask;
166178
exports['build.demo'] = buildDemo;
167179
exports['build.dist'] = buildDist;
168180
exports['bump-minor'] = bumpMinor;

0 commit comments

Comments
 (0)