Commit 19d19fd7 authored by Robert Knight's avatar Robert Knight

Rename `*.mjs` -> `*.js`

Now that the package type is set to `module`, we don't need to use a custom
extension to indicate that a script is ESM.
parent 239a63b3
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
}, },
"overrides": [ "overrides": [
{ {
"files": ["*.mjs"], "files": ["*.js"],
"excludedFiles": ["src/**"],
"env": { "node": true }, "env": { "node": true },
} }
] ]
......
...@@ -104,7 +104,7 @@ jobs: ...@@ -104,7 +104,7 @@ jobs:
run: | run: |
git fetch --tags --quiet git fetch --tags --quiet
PREV_VERSION=$(git tag --list | sort --version-sort --reverse | head -n1 | tail -c +2) PREV_VERSION=$(git tag --list | sort --version-sort --reverse | head -n1 | tail -c +2)
NEW_VERSION=$(node scripts/bump-version.mjs minor $PREV_VERSION) NEW_VERSION=$(node scripts/bump-version.js minor $PREV_VERSION)
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Tag new version - name: Tag new version
run: | run: |
......
...@@ -10,12 +10,12 @@ import gulp from 'gulp'; ...@@ -10,12 +10,12 @@ import gulp from 'gulp';
import { serveDev } from './dev-server/serve-dev.js'; import { serveDev } from './dev-server/serve-dev.js';
import { servePackage } from './dev-server/serve-package.js'; import { servePackage } from './dev-server/serve-package.js';
import tailwindConfig from './tailwind.config.mjs'; import tailwindConfig from './tailwind.config.js';
import annotatorTailwindConfig from './tailwind-annotator.config.mjs'; import annotatorTailwindConfig from './tailwind-annotator.config.js';
import sidebarTailwindConfig from './tailwind-sidebar.config.mjs'; import sidebarTailwindConfig from './tailwind-sidebar.config.js';
gulp.task('build-js', () => buildJS('./rollup.config.mjs')); gulp.task('build-js', () => buildJS('./rollup.config.js'));
gulp.task('watch-js', () => watchJS('./rollup.config.mjs')); gulp.task('watch-js', () => watchJS('./rollup.config.js'));
gulp.task('build-annotator-tailwind-css', () => gulp.task('build-annotator-tailwind-css', () =>
buildCSS(['./src/styles/annotator/annotator.scss'], { buildCSS(['./src/styles/annotator/annotator.scss'], {
...@@ -96,7 +96,7 @@ const manifestSourceFiles = 'build/{scripts,styles}/*.{css,js,map}'; ...@@ -96,7 +96,7 @@ const manifestSourceFiles = 'build/{scripts,styles}/*.{css,js,map}';
gulp.task('build-boot-script', async () => { gulp.task('build-boot-script', async () => {
await generateManifest({ pattern: manifestSourceFiles }); await generateManifest({ pattern: manifestSourceFiles });
await buildJS('./rollup-boot.config.mjs'); await buildJS('./rollup-boot.config.js');
}); });
gulp.task('watch-boot-script', () => { gulp.task('watch-boot-script', () => {
...@@ -155,7 +155,7 @@ gulp.task( ...@@ -155,7 +155,7 @@ gulp.task(
runTests({ runTests({
bootstrapFile: 'src/sidebar/test/bootstrap.js', bootstrapFile: 'src/sidebar/test/bootstrap.js',
karmaConfig: 'src/karma.config.cjs', karmaConfig: 'src/karma.config.cjs',
rollupConfig: 'rollup-tests.config.mjs', rollupConfig: 'rollup-tests.config.js',
testsPattern: 'src/**/*-test.js', testsPattern: 'src/**/*-test.js',
}) })
) )
......
import semver from 'semver'; import semver from 'semver';
// Usage: node bump-version.mjs <PART> <VERSION> // Usage: node bump-version.js <PART> <VERSION>
// //
// Example: // Example:
// node bump-version.mjs minor 1.2.3 # Outputs 1.3.0 // node bump-version.js minor 1.2.3 # Outputs 1.3.0
const partStr = process.argv[2]; const partStr = process.argv[2];
const versionStr = process.argv[3]; const versionStr = process.argv[3];
const version = semver.parse(versionStr); const version = semver.parse(versionStr);
......
...@@ -139,7 +139,7 @@ function NotebookView({ loadAnnotationsService, streamer }: NotebookViewProps) { ...@@ -139,7 +139,7 @@ function NotebookView({ loadAnnotationsService, streamer }: NotebookViewProps) {
className={classnames( className={classnames(
'container flex flex-row-reverse relative', 'container flex flex-row-reverse relative',
// Compensate for container's right padding, which is defined in // Compensate for container's right padding, which is defined in
// tailwind.config.mjs // tailwind.config.js
'right-[4rem]', 'right-[4rem]',
)} )}
> >
......
...@@ -139,7 +139,7 @@ function SidebarView({ ...@@ -139,7 +139,7 @@ function SidebarView({
'fixed z-1', 'fixed z-1',
// Setting 9px to the right instead of some standard tailwind size, // Setting 9px to the right instead of some standard tailwind size,
// so that it matches the padding of the sidebar's container. // so that it matches the padding of the sidebar's container.
// DEFAULT `.container` padding is defined in tailwind.conf.mjs // DEFAULT `.container` padding is defined in tailwind.conf.js
'right-[9px] top-12', 'right-[9px] top-12',
)} )}
> >
......
import tailwindConfig from './tailwind.config.mjs'; import tailwindConfig from './tailwind.config.js';
export default { export default {
presets: [tailwindConfig], presets: [tailwindConfig],
......
import tailwindConfig from './tailwind.config.mjs'; import tailwindConfig from './tailwind.config.js';
export default { export default {
presets: [tailwindConfig], presets: [tailwindConfig],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment