Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpin and upgrade dependencies #263

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"license": "Apache-2.0",
"dependencies": {
"@babel/generator": "7.17.7",
"@babel/generator": "^7.17.7",
"@babel/parser": "^7.20.5",
"@babel/traverse": "7.17.3",
"@babel/types": "7.17.0",
"javascript-natural-sort": "0.7.1",
"@babel/traverse": "^7.23.2",
"@babel/types": "^7.17.0",
"javascript-natural-sort": "^0.7.1",
"lodash": "^4.17.21"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/utils/__tests__/get-code-from-ast.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import a from 'a';
expect(format(formatted, { parser: 'babel' })).toEqual(
`// first comment
// second comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point adding new lines ? Is this coming from an IDE formater ?

Copy link
Contributor Author

@harryzcy harryzcy Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are generated after @babel/generator >=7.19.x.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With 7.19.3 the tests pass, but 7.19.4 they fail. Probably due to this PR: babel/babel#14979

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eldemarkki The PR tagged as 8.0.0-alpha.2 but the changelog saids released under 7.19.4.
Did they just messed up the release?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems its an unvoidable breaking change

import a from "a";
import c from "c";
import g from "g";
Expand Down
1 change: 1 addition & 0 deletions tests/Babel/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function add(a,b) {
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.

import thirdParty from "third-party";
import z from "z";

Expand Down
2 changes: 2 additions & 0 deletions tests/Flow/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export function givesAFoo3Obj(): AliasFoo3 {
/**
* @flow
*/

// I am top level comment in this file.

import thirdParty from "third-party";

import abc from "@core/abc";
Expand Down
5 changes: 5 additions & 0 deletions tests/ImportsNotSeparated/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import React from "react";
import "./commands";

Expand Down Expand Up @@ -131,6 +132,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import thirdParty from "third-party";
import z from "z";
import abc from "@core/abc";
Expand Down Expand Up @@ -245,6 +247,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//@ts-ignore
// I am file top level comments

import a from "a";
import c from "c";
// I am stick to third party comment
Expand Down Expand Up @@ -323,6 +326,7 @@ import fourLevelRelativePath from "../../../../fourLevelRelativePath";
import something from "@server/something";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment

import abc from "@core/abc";
import otherthing from "@core/otherthing";
import something from "@server/something";
Expand Down Expand Up @@ -378,6 +382,7 @@ import './commands';
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";

Expand Down
5 changes: 5 additions & 0 deletions tests/ImportsNotSeparatedRest/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import React from "react";
import "./commands";

Expand Down Expand Up @@ -131,6 +132,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import abc from "@core/abc";
import otherthing from "@core/otherthing";
import qwerty from "@server/qwerty";
Expand Down Expand Up @@ -188,6 +190,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//@ts-ignore
// I am file top level comments

import otherthing from "@core/otherthing";
import something from "@server/something";
import component from "@ui/hello";
Expand Down Expand Up @@ -266,6 +269,7 @@ import fourLevelRelativePath from "../../../../fourLevelRelativePath";
import something from "@server/something";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment

import abc from "@core/abc";
import otherthing from "@core/otherthing";
import something from "@server/something";
Expand Down Expand Up @@ -321,6 +325,7 @@ import './commands';
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";

Expand Down
6 changes: 6 additions & 0 deletions tests/ImportsSeparated/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import React from "react";

import "./commands";
Expand Down Expand Up @@ -136,6 +137,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import thirdParty from "third-party";
import z from "z";

Expand Down Expand Up @@ -196,6 +198,7 @@ const workletAdd = (a:number,b:number) => {
"use client";

// comment after directives

import abc from "@core/abc";
import otherthing from "@core/otherthing";

Expand Down Expand Up @@ -262,6 +265,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//@ts-ignore
// I am file top level comments

import a from "a";
import c from "c";
// I am stick to third party comment
Expand Down Expand Up @@ -347,6 +351,7 @@ import fourLevelRelativePath from "../../../../fourLevelRelativePath";
import something from "@server/something";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment

import abc from "@core/abc";
import otherthing from "@core/otherthing";

Expand Down Expand Up @@ -405,6 +410,7 @@ import './commands';
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";

Expand Down
5 changes: 5 additions & 0 deletions tests/ImportsSeparatedRest/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import React from "react";

import "./commands";
Expand Down Expand Up @@ -136,6 +137,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment in this file.
// I am second line of top level comment in this file.

import abc from "@core/abc";
import otherthing from "@core/otherthing";

Expand Down Expand Up @@ -197,6 +199,7 @@ function add(a:number,b:number) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//@ts-ignore
// I am file top level comments

import otherthing from "@core/otherthing";

import something from "@server/something";
Expand Down Expand Up @@ -282,6 +285,7 @@ import fourLevelRelativePath from "../../../../fourLevelRelativePath";
import something from "@server/something";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// I am top level comment

import abc from "@core/abc";
import otherthing from "@core/otherthing";

Expand Down Expand Up @@ -340,6 +344,7 @@ import './commands';
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";

Expand Down
4 changes: 4 additions & 0 deletions tests/Vue/__snapshots__/ppsi.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function add(a,b) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script setup>
// I am top level comment in this file.

import thirdParty from "third-party";
import { defineComponent } from "vue";
import z from "z";
Expand Down Expand Up @@ -85,6 +86,7 @@ export default defineComponent({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script>
// I am top level comment in this file.

import thirdParty from "third-party";
import { defineComponent } from "vue";
import z from "z";
Expand Down Expand Up @@ -165,6 +167,7 @@ export default defineComponent({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script lang="ts">
// I am top level comment in this file.

import thirdParty from "third-party";
import { defineComponent } from "vue";
import z from "z";
Expand Down Expand Up @@ -222,6 +225,7 @@ export default defineComponent({
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script lang="tsx">
// I am top level comment in this file.

import thirdParty from "third-party";
import { defineComponent } from "vue";
import z from "z";
Expand Down